Jump to content

Changing values in tables


Fira

Recommended Posts

How do you change the values of variables? I know one method would be

[quote]
UPDATE user SET variable1 = '15', variable2 = '60' WHERE userid = '$userid'";
[/quote]

But what if I wanted to add 5 to variable2? Would I need to first retrieve variable2, add 5 to it, then set the new value to variable2, or is there an easier MySQL command, like UPDATE user ADD?
Link to comment
https://forums.phpfreaks.com/topic/21941-changing-values-in-tables/
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.