you can use:
UPDATE column SET column + 1 WHERE condition
JJ Harrison wrote:
what is the best way to increment a mySQL table cell?
is there a increment function or do I need to increment it in php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Table fubar
ID, SomeNumber
1 456
2 123
3 3
4 4589
$query = UPDATE fubar SET SomeNumber = SomeNumber+1 WHERE ID = 2;
Result
Table fubar
ID, SomeNumber
1 456
2 124
3 3
4 4589
On Fri, 28 Jun 2002, JJ Harrison wrote:
-what is the best way to increment a mySQL
2 matches
Mail list logo