You can also use the time() function
Add 2 fields for referencing. During your INSERT INTO process, add the time to the fields.
fieldname: start_date
fieldname: end_date
$start_date = time();
$end_date = time();
Now, in your query, you just have to do the following:
$current_time = time();
$sql = mysql_query("SELECT * FROM tablename WHERE start_date < $current_time AND end_date < $current_time") or die (mysql_error());
Using the time function, you can setup going back a set number of days or minutes. The following will go back 30 days.
Calculation: second x minuts x hours x days
60 * 60 24 30 = 2592000
$current_time = time()-2592000;
$sql = mysql_query("SELECT * FROM tablename WHERE start_date < $current_time AND end_date < $current_time") or die (mysql_error());