Jump to content

DELETE where time 5 minutes ago?


tjhilder

Recommended Posts

I've created an online users script, the inserting and updating works fine, just need to delete the entries that are inactive before 5 minutes ago.

here's my code.

[code]
$delete_lookup = "DELETE FROM v3_usersonline WHERE time='<= " . $five . "'";
if (!$delete_lookup_result = mysql_query($delete_lookup))
{
    echo "nothing deleted because : " . mysql_error() . " the query was: " . $delete_lookup;
}
else
{
    echo "";
}
[/code]
Link to comment
https://forums.phpfreaks.com/topic/6313-delete-where-time-5-minutes-ago/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.