Jump to content

Field Updates


master82

Recommended Posts

Here is what i currently have to update my users days old - it will be part of a cron that is run at midnight.

[code]include_once("connectionfile.php");
mysql_query("UPDATE users SET daysold=daysold+1",$connect);[/code]

Now if I was to run this would it go through each row in the users table and add 1 to the field named 'daysold' or will it do the thing I really dont want and make everyones 'daysold' the same.

If the second, can anyone add to my code to make the calculation for each row?
Link to comment
https://forums.phpfreaks.com/topic/19692-field-updates/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.