Hello all,
Having a bit of a problem and not sure where to start with.
Maybe someone here could point me in the correct direction.
I have the following code.
$result = mysql_query("SELECT proposal.*, count(bid.proposalid) AS bids,SYSDATE(), TIME_FORMAT(TIMEDIFF(tomorrowtime, SYSDATE()), '%H hours, %i minutes') AS timeleft
FROM proposal
LEFT JOIN bid ON proposal.proposalid = bid.proposalid
WHERE proposal.username = '$username' AND proposal.time > NOW()- INTERVAL 1 DAY
GROUP BY proposal.proposalid");
This returns a set of results which I echo to the screen
If you see there I have a where NOW()- INTERVAL 1 DAY.
I want to change this to an interval of 2 days so that results for the last two days are returned
However because its a 24 auction im building whereby the auction runs for 24hrs and there is a period of 24hrs where people can accept the bids I want the timeleft row only to countdown for first 24 hours and then stop and say someting like 'end of auction' .
Anyone have an idea how to do this?
Any suggestions really appreciated!
Thanks