Hi,
I wish to select three auctions that hold the highest number of bids (num_bids) and if any hold the same number pick the highest viewed (viewed), so I end up with the three hottest auctions.The above variables are held in the same table below.
Now I already have a loop query running to show the last three uploaded auctions in the login area ....query below. I would like just to duplicate the query with the added changes into a new page, as the rest of the script does time, started, area, ending, price, picture..etc which I would still require.
I am stuck on how to extract the auctions by checking which three have the highest bids..etc
$limit = 20;
if(!$offset) $offset = 0;
$result = mysql_query ( "SELECT * FROM AUC_qwr WHERE closed='0' AND suspended = '0' AND local_area= '$local_area' ORDER BY ends ASC LIMIT $offset,$limit" );
if ($result)
{
$tplv = "";
$bgColor = "#EBEBEB";
while ($row=mysql_fetch_array($result))
all help appreciated.
John
I wish to select three auctions that hold the highest number of bids (num_bids) and if any hold the same number pick the highest viewed (viewed), so I end up with the three hottest auctions.The above variables are held in the same table below.
Now I already have a loop query running to show the last three uploaded auctions in the login area ....query below. I would like just to duplicate the query with the added changes into a new page, as the rest of the script does time, started, area, ending, price, picture..etc which I would still require.
I am stuck on how to extract the auctions by checking which three have the highest bids..etc
$limit = 20;
if(!$offset) $offset = 0;
$result = mysql_query ( "SELECT * FROM AUC_qwr WHERE closed='0' AND suspended = '0' AND local_area= '$local_area' ORDER BY ends ASC LIMIT $offset,$limit" );
if ($result)
{
$tplv = "";
$bgColor = "#EBEBEB";
while ($row=mysql_fetch_array($result))
all help appreciated.
John