I'm working on an auction script for a client. This portion of the script pulls all the open auctions from the database and allows bidding, but they only want bidding on auction with 30 seconds left until it ends.
$query = "select * from DSI_auctions
WHERE closed='0' AND
suspended='0' AND ";
$query .= "starts<=".$NOW."
order by ends LIMIT ".$SETTINGS['endingsoonnumber'];
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);
//echo $num_auction;
I've thought of having the script change the current time and ending time to epoch and determinig the difference but if I do that it will only return 1 row even if I add something like:
$AE = 0;
while $AE < 10 {
}
$AE++
I am stupmed.