I need to test current time against a datetime from database, if it has been 30 mins then execute code, if not then dont. This is where I am at and I am stuck:
do it all in sql statement
SELECT id FROM `dqCache` WHERE `time`
This will return everything from your table where the time column is before 30 minutes before now.