Too many results
Posted: Sun Jul 14, 2002 9:21 pm
I have 2 seperate tables, one with ad information and one with pictures, the are related by adID field. When i run this
however, it seems the right images are printed but they are printed once for each ad in search query. I only want them printed once, (may be more than one image ascosiated with an ad). Whats wrong with the code?
Code: Select all
while($row = mysql_fetch_array($results, MY
SQL_ASSOC)) {
$count+=1;
$asdf = mysql_query("SELECT * from pictures, user_ads where pictures.adID = '$rowїadID]'");
while($apic = mysql_fetch_array($asdf, MYSQL_ASSOC)) {
echo "$apicїsrc] : : : $count<br>";
}