Missing Results returned in SQL??
Posted 17 December 2003 - 02:46 AM
I have several suburbs in my table. Some of them repeat, and I am trying to display them in a list box. No problem...
$result= MYSQL_QUERY(\"SELECT * FROM renovator);
and I get everything I need, but of course there are repeated values.
$result= MYSQL_QUERY(\"SELECT DISTINCT suburb FROM renovator WHERE region = \'$region\' ORDER BY suburb ASC\");
great... works a treat, but there is a value(suburb) missing. No matter what I do, I cannot get all the values to show up.
$result= MYSQL_QUERY(\"SELECT DISTINCT suburb FROM renovator WHERE region = \'$region\'\");
returns a different set of values... with the suburb I needed present, but now a different suburb missing??
I have no idea what is going on.
Posted 17 December 2003 - 07:47 AM
\"SELECT DISTINCT region, suburb FROM renovator ORDER BY region, suburb\"
and see if that throws up any clues.
Donations gratefully received
|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts
Posted 17 December 2003 - 11:20 PM
I have discovered that the problem was a line in my PHP code.
Thank you very much for your reply anyway.
Have a great xmas.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users