Jump to content

Archived

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

tjhilder

DELETE where time 5 minutes ago?

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]

Share this post


Link to post
Share on other sites

×

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.