increase value by 1 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: increase value by 1 (
/showthread.php?tid=244743)
increase value by 1 -
ajwar - 28.03.2011
Hi, how to increase field value by 1 with mysql query?
Re: increase value by 1 -
THE_KNOWN - 28.03.2011
get the value first, store it, add it , update it simple
Re: increase value by 1 - XFlawless - 28.03.2011
AUTO_INCREMENT
Re: increase value by 1 -
ajwar - 28.03.2011
i know it's possible withaut getting the value, it's something like that:
pawn Код:
format(Query1, sizeof(Query1), "UPDATE `usrinv` SET `user_invited` +1 WHERE `user_code` = '%i' LIMIT 1", code);
Re: increase value by 1 -
-Rebel Son- - 28.03.2011
Update a value like so
Either +1
or ++