Jump to content

[SOLVED] Just Checking - Simple question


Ell20

Recommended Posts

Hey,

 

Is it possible to update a table like this:

 

$update2 = "UPDATE models SET referals='referals + 1' WHERE user_id='$userid'" or die(mysql_error());

mysql_query($update2) or die(mysql_error());

 

Or do I have to query to find the current value then do current value + 1 then use that new variable?

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/99808-solved-just-checking-simple-question/
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.