I am getting data out of a table and presenting it on a page. The presentation is sorted as it is found in the database, however, I want to sort it and present the date in terms of highest price first.
My script is :-
echo "<table width = '750' border = '1'>";
echo "<tr><td width = '50'>Bid No.</td>
<td width = '50'>X</td>
<td width = '100'>Bid</td>
<td width = '200'>Payment Terms </td>
<td width = '200'>View </td>
<td width = '150'>Bidder </td></tr>";
$sql = "SELECT * FROM Bids
WHERE BIDoffCode = '$TIcode' ";
$result = mysql_query($sql)
or die ("Couldn't execute sql.");
while ($row = mysql_fetch_array($result))
{
extract($row);
echo "<tr><td width = '50'>$BIDcode</td>
<td width = '50'>X</td>
<td width = '100'>$BIDprice </td>
<td width = '200'>$BIDterm</td>
<td width = '200'>$BIDview</td>
<td width = '150'>$BIDder</td></tr>";
}
echo "</table>";
Can some one give me help..
Ta