03-23-2009, 06:36 PM
|
#6 (permalink)
|
|
The Contributor
Join Date: Mar 2008
Posts: 62
Thanks: 2
|
Quote:
Originally Posted by Andrial12
PHP Code:
DELETE FROM `users`
WHERE
`signupdate` < DATE_SUB( NOW(), INTERVAL 24 HOUR )
AND `lastlogin` = `signupdate`
|
How efficient is this block of code compared to mine?
My timer says ~0.002 seconds to process.
I have a dynamic time-frame based on the database...so would be using...
PHP Code:
//theres more code to get the variable
//but for demonstration
$timeframe=$row['loginwindow'];
DELETE FROM `users`
WHERE
`signupdate` < DATE_SUB( NOW(), INTERVAL {$timeframe} HOUR )
AND `lastlogin` = `signupdate`
be correct?
|
|
|