How do I add 1 number to the db?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Wuggy
Forum Newbie
Posts: 4
Joined: Tue Mar 09, 2004 9:30 am

How do I add 1 number to the db?

Post by Wuggy »

example:
The number in the database is 4, the script adds 1 to the table and it becomes 5

Sounds like a newbie question, but I can't find any tutorials or help on it :-\.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

UPDATE tablename SET colname=colname+1 WHERE something='whatever'
Wuggy
Forum Newbie
Posts: 4
Joined: Tue Mar 09, 2004 9:30 am

thanks much

Post by Wuggy »

:D
Post Reply