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 :) Link to comment https://forums.phpfreaks.com/topic/17967-simple-mass-update/ Share on other sites More sharing options...
fenway Posted August 18, 2006 Share Posted August 18, 2006 UPDATE users SET daysold = daysold + 1 Link to comment https://forums.phpfreaks.com/topic/17967-simple-mass-update/#findComment-76882 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 Link to comment https://forums.phpfreaks.com/topic/17967-simple-mass-update/#findComment-76883 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.