I have 2 dates in my database (mySQL). The first date is where my auction starts, the second is where the auction ends. Is there a simple way to take a date (today) and see if it is between the 2 dates in the database?
I have tested the following code:
$date = date("Y-m-d");
$result = mysql_query("SELECT auction_id FROM auctions WHERE '$date' BETWEEN '$auction_start_date' AND '$auction_end_date'");
But that gives me everything in the database all the time.