View Single Post
Old 03-23-2009, 06:36 PM   #6 (permalink)
Seraskier
The Contributor
 
Join Date: Mar 2008
Posts: 62
Thanks: 2
Seraskier is on a distinguished road
Default

Quote:
Originally Posted by Andrial12 View Post
PHP Code:
DELETE FROM `users`
WHERE
    
`signupdate` < DATE_SUBNOW(), 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_SUBNOW(), INTERVAL {$timeframeHOUR )
AND `
lastlogin` = `signupdate
be correct?
Send a message via MSN to Seraskier
Seraskier is offline  
Reply With Quote