Page 1 of 1

How do i add to an interger through sql

Posted: Mon Jul 10, 2006 2:05 am
by HomerTheDragoon
Alright i cant figure this out for some reason..

I have an interger stored in my sql db, and i want to add lets say, 4 to it. How do i do this? I can update strings, but i cant get it to update intergers.

Edit: nvm, there was a mistake in my code :P

Posted: Mon Jul 10, 2006 3:42 am
by Jenk
FYI:

Code: Select all

UPDATE `table` SET `column` = `column` + 4 WHERE `blah` = 'foo';

Posted: Mon Jul 10, 2006 3:42 am
by HomerTheDragoon
yah i was doing that, but i wasnt acutally getting the info from the db:P i left it out some how.