I am getting an empty set from this code. $query = mysql_query("select a.im_name, b.name, a.description from images a, department b where a.dpt_id = b.dpt_id and a.dpt_id = '$pid' LIMIT 0, 30 ;") or die(mysql_error()); while($row = mysql_fetch_array($query)) { echo "$row['im_name']"; } Code (markup): The echo does not appear. If I put the select statement in MySQL it works perfectly. Any help would be appreciated. Thank you
How do you know what the SELECT statement is to put into MYSQL? To make sure the SQL statement you are intending to run is the one you are actually running I would echo out this: "select a.im_name, b.name, a.description from images a, department b where a.dpt_id = b.dpt_id and a.dpt_id = '$pid' LIMIT 0, 30 ;" PHP: Once you echo that out paste it into MYSQL and see if its runs. My guess is that $pid is not what you think it is.
I have the DB working perfectly. Just having trouble outputting the XML string correctly. Thanks for all your help. Gordon