crouchjay Posted July 11, 2006 Share Posted July 11, 2006 I am trying to delete all users from table usersonline after 30 minutes of inactivity. The query runs, but nothing happens. How else can I approach this?Thanks in advance Jay.[code]$query="SELECT * FROM usersonline WHERE DATE_SUB(NOW(), INTERVAL 30 MINUTE) <= LastTime";[/code] Link to comment https://forums.phpfreaks.com/topic/14259-deleting-users-by-time/ Share on other sites More sharing options...
fenway Posted July 11, 2006 Share Posted July 11, 2006 The following should work, provided ListTime is a datetime field (untested):[code]SELECT * FROM usersonline WHERE LastTime + INTERVAL 30 MINUTE <= NOW()[/code] Link to comment https://forums.phpfreaks.com/topic/14259-deleting-users-by-time/#findComment-56059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.