Click to See Complete Forum and Search --> : Incrementing a value in MySQL


Sleep Mode
12-31-2006, 07:18 PM
Hi :) I know the auto_increment property of mysql, but i want to increment a value in the table, when something added to another table.

Should i get the value by select.... and then add it by php. and then update it to the database? is there any easy way for this? Thanks :)

NogDog
01-01-2007, 01:13 PM
UPDATE table_name SET column1 = column1 + 1 WHERE column2 = 'some value';