OK.. i think im on a good path here..
I'm doing this after connecting and printing the table headers:
Code:
$result = mysql_query("SELECT * FROM {$table}");
if (!$result) {
die("Query to show fields from table failed");
}
while($rows=mysql_fetch_array($result)) {
?>
<tr>
<?php
$sQry = 'SELECT `tag`, `price`, MIN(`price`) AS lowest FROM expedia GROUP BY `tag`';
if (!$sQry) {
printf('<td align='center' border='1' frame="box" rules="all"><? echo $rows['tag']; ?></td>');
}
else
{
printf('<tr><td title="%s">%s</td><td>%0.2f</td></tr>', 'Lowest Price: ' . $row['lowest'], $row['identifier'], $row['price']);
}
mysql_free_result($sQry);
?>
<td align='center' border='1' frame="box" rules="all"><? echo $rows['url']; ?></td>
<td align='center' border='1' frame="box" rules="all"><? echo $rows['price']; ?></td>
</tr>
<?php
}
?>
</table>
Not working as of yet..
i'm able to get it done with a while within the if.. but i cant get back to the original SQL data..
(if you can't tell i've only been learning SQL for about 2 months.. sorry so noob)