I am trying to pull a range of dates for a tape library database that reflect tapes that are overdue for purge between 30 and 59 days old as of todays date.
The select statement I have been working on with not very much luck is as follows:
$query = "select * from tapes where purge_date between (current_date -30) and (current_date -59) order by purge_date";
$result = mysql_query($query);
This is the first time I have tried to do this type of select statement and I am not sure of the correct syntax even though I have looked through various books and online examples.
Any help would be greatly appreciated.
Thanks.