master82 Posted August 18, 2006 Share Posted August 18, 2006 I have the field '[b]daysold[/b]' in my [b]users[/b] table.How would I go about updating this by 1 each time I run the script for all the entries in the users table? (the script will become a cron I will run at midnight each day)I have tried in the past but it updated all the entries (users) with the same number, rather than each entry! lolAny help would be kindly recieved :) Quote Link to comment Share on other sites More sharing options...
fenway Posted August 18, 2006 Share Posted August 18, 2006 UPDATE users SET daysold = daysold + 1 Quote Link to comment Share on other sites More sharing options...
master82 Posted August 18, 2006 Author Share Posted August 18, 2006 But wont that update all the users entries to the same number.eguser 1 - 1 day olduser 2 - 2 days olduser 3 - 6 days oldwill becomeuser 1 - 2days olduser 2 - 2 days olduser 3 - 2 days oldI could be wrong though... Ill give it a try Quote Link to comment Share on other sites More sharing options...
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.