The Ace Posted August 3, 2008 Posted August 3, 2008 Hello. I need an SQL query that will update users to whatever I enter, but only to those users who have logged in in the past 3 days. UPDATE `users` SET `bankmoney=bankmoney+10000` WHERE `bankmoney` != '-1' AND `fedjail` = '0' AND `last_login` ......; The ...... is where the unix time stamp is for the people who have logged in in the past three days. I'm not good with unix time stamps....may someone please help me? Cheers, The Ace Quote
Guest Anonymous Posted August 3, 2008 Posted August 3, 2008 Re: Time Stamp Help? UPDATE users SET bankmoney = bankmoney + 10000 WHERE ((bankmoney >= 0) AND (fedjail <= 0) AND (last_login >= (UNIX_TIMESTAMP() - (3 * 86400)))) Adjusting the "3" would alter the number of days ... Quote
The Ace Posted August 3, 2008 Author Posted August 3, 2008 Re: Time Stamp Help? Ahha, thanks a lot Nyna!! Highly appreciated! :lol: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.