View Full Version : Trying to display top purchases in list [simple help]

02-20-2012, 12:33 AM
I'm trying to display the Top Purchases, but it doesn't order it from highest amount to lowest

<link rel="stylesheet" href="style.css" type="text/css">
<?php require "config.inc.php"; ?>
<div style="margin-bottom:10px; background-image: url('donate.png'); background-position:center; background-repeat:no-repeat; width:162px; height:60px;"></div>
<div class="box2"><?php
$result3 = mysql_query("SELECT * FROM data");
$total = mysql_num_rows($result3);
echo "<font color='white'><span class='text'>";
echo "<center>";
echo "Total ranks Sold: ";
echo $total;
echo "</center>";
echo "</font></span>";
<form action="index.php">
<input type="submit" class="button" value="<- Go Back">
</form><br />
$result23 = mysql_query("SELECT * FROM data ORDER BY price DESC LIMIT 10");
echo '<span class="text" style="font-size:14px;"><table border="0px" cellpadding="1" cellspacing="1">

<th width="30"><strong><font color="#0D58A6" size="3px">User</font></strong></th>
<th width="30"><strong><font color="#0D58A6" size="3px">Payed</font></strong></th>
<th width="30"><strong><font color="#0D58A6" size="3px">Rank</font></strong></th></tr></tr>';
while ($row = mysql_fetch_array($result23)) {
$id = $row['id'];
$price = $row['price'];
$rank = $row['rank'];
$user = $row['username'];

print '<font color="white"><tr align="center">';

echo '

<td><strong>' . $row["username"] . '</strong></td>
<td><strong>$' . $row["price"] . '.00</strong></font></td>
<td><strong>' . $row["rank"] . '</strong></font></td>';

print "</table></span>";

Here is what it display's

02-20-2012, 03:33 AM
Please anyone :( It;s not ordering

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum