Skip to main content
Inspiring
June 12, 2012
Question

Newbie Dynamic data question/help request :)

  • June 12, 2012
  • 1 reply
  • 677 views

Hi

I am trying to do some simple test work with MySQL and Dreamweaver CS5.5.  I am very new to SQL/dynamics, and have got some basic stuff working, but one thing is bugging me at present and any help/suggestions would be welcome

I have set up two tables using XAMPP/PHPMyAdmin, one called testname, the other testalbum.

The tables consist of columns

NameID, Name

AlbumID, NameID, Title

I am trying to link from page 1 (which lists each name alphabetically (which is in place)) and each name links to another page listing each album by that artist. This is where I hit a problem, it seems no matter what I try to do in recordsets/server behaviours, I get either all albums listed or just Album 1.  I don't seem to be able to get the album associated with the name to list only

Is anyone able to point me in the right direction?

Many thanks

This topic has been closed for replies.

1 reply

Community Expert
June 13, 2012

While I'm a stout supporter of DW, it's recordset functions are sorely lacking and you will do yourself a huge favor by learning how to write the query yourself.  In this scenario you need to run a query with the WHERE statement of "WHERE {id user selects} = AlbumID".  That result will return many results, I assume.  The way the SQL query works is it returns the value into an array.  The following is a tutorial going over the basics of a while loop with SQL queries:

http://www.tizag.com/mysqlTutorial/mysqlfetcharray.php

If you have any issues or questions trying to implement that loop feel free to post back.  But having that understanding will help in trying to explain anything in further detail if you run into issues.

Inspiring
June 13, 2012

HI

I'll look at that link later today thanks.  I am looking to learn this and have had some success, in that I can do things such as create database reports, but this one thing has stumped me at present.  I am using the Missing Manual book on dreamweaver which I finnd generally pretty good

Many thanks