Jump to content

**SOLVED** Add to a number


Imperialdata

Recommended Posts

I have a database which I would like to do the following:

In table_userinfo I have columns user_id and user_credits.
I wish to add 50 to the number stored in user_credits for a single user (say user_id=5) via a php script

How is this best achieved? I have succeeded in retrieving the data from the field using

return mysql_fetch_array($res,MYSQL_ASSOC);

but I am struggling to add 50 to it and drop it back into the table.



Thanks in advance



----------------------------------------------------------

[a href=\"http://www.TheBikeForum.com\" target=\"_blank\"]Like Motorcycles?[/a]

----------------------------------------------------------
Link to comment
https://forums.phpfreaks.com/topic/6293-solved-add-to-a-number/
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.