The values are inserted using "insert(NOW())"
Now, I want to delete entries in ChatMessages_tbl which are more than half an hour old from the current time.
I am looking for the syntax.
I tried this, but deletes even recent messages.
Code: Select all
$oldTime = date("YmdHis",time()) - (60*30);
$query = "delete from ChatMessages_tbl where `Time` < $oldTime";