View Single Post
Old 11-27-2012, 01:26 PM   PM User | #21
stevenryals
New Coder

 
Join Date: Jul 2012
Posts: 60
Thanks: 4
Thanked 0 Times in 0 Posts
stevenryals is an unknown quantity at this point
I'm having a tough time getting this to work...

what if I selected all my data and put it in $row ... then when i get to the `tag` <td> on each row.. could i do something like this specific for that field??

Code:
//should this only return 1 record? the minimum of the specified tag?
$min = mysql_query("SELECT `tag`, MIN(`price`) AS lowest FROM expedia where `tag` = $row[`tag`]") ;

while ($tagrow = mysql_fetch_array($result, MYSQL_NUM)) {
    "PRINT TD with TITLE HERE";
}

mysql_free_result($min);
and this would cycle though the larger "while" statement to print the rest of the fields. but would go through this once for each row??

is that a bad idea?
stevenryals is offline   Reply With Quote