Originally Posted by Fou-Lu
Yeah I'll move this to the MySQL forum as well.
Thanks a lot for your help. i've used that and it's returning a blank set of results.. Hmmmmm..
Here's what i have after connecting, testing and printing the table headers:
$sMinQry = 'SELECT `tag`, `price`, MIN(`price`) AS lowest FROM expedia GROUP BY `tag`';
if ($minQry = mysql_query($sMinQry))
$aMins = array();
while ($row = mysql_fetch_assoc($minQry))
$aMins[$row['tag']] = $row['lowest'];
$sQry = 'SELECT `tag`, `price` FROM myproducts ORDER BY `tag`';
if ($qry = mysql_query($sQry))
while ($row = mysql_fetch_assoc($qry))
printf('<tr><td title="%s">%s</td><td>%0.2f</td></tr>', 'Lowest Price: ' . $aMins[$row['tag']], $row['tag'], $row['price']);
i do have complete records in the database.. not sure why it's doing that..