what's the easiest way to only select entries in a database from 30 days ago to current?
$sql99 = "SELECT * FROM support_logbook ORDER BY date DESC, time DESC";
The date in the database is in the DATE format, so it should be fairly easy.
$date = date("Y-m-d", mktime(0,0,0, date("m"), date("d")-30, date("Y"))); $sql99 = "SELECT * FROM support_logbook WHERE date >= '".$date."' ORDER BY date DESC, time DESC";
SELECT * FROM tablename WHERE (datecolumn + INTERVAL 30 DAY) >= NOW()