SA-MP Forums Archive
Language sql help navicat - 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)
+--- Thread: Language sql help navicat (/showthread.php?tid=660298)



Language sql help navicat - skiplovebra - 30.10.2018

Currently I want to use sql language in navicat set for membership account on level 3 gets 200 credits How to use code like? My plevel and pcredits



Re: Language sql help navicat - TheToretto - 30.10.2018

PHP код:
 UPDATE yourtable SET pcredits='200' WHERE plevel ='3'



Re: Language sql help navicat - skiplovebra - 30.10.2018

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
PHP код:
 UPDATE yourtable SET pcredits='200' WHERE plevel ='3'
I have done successfully but I want to add more as I did not do
UPDATE `accounts` SET Credits +='200' WHERE Level +='3';


Re: Language sql help navicat - TheToretto - 30.10.2018

Rename your table to gtarp without the " - "


Re: Language sql help navicat - skiplovebra - 30.10.2018

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
Rename your table to gtarp without the " - "
I want to implement add value but not?
UPDATE `accounts` SET Credits +='200' WHERE Level +='3';


Re: Language sql help navicat - skiplovebra - 30.10.2018

Done
Close topic
thanks


Re: Language sql help navicat - TheToretto - 30.10.2018

What I understood is to set players with only the level 3, 200 Credits.

If you want to increment the values of ALL players with no condition, you can do that:

pawn Код:
UPDATE accounts SET pcredits= pcredits + 1, plevel = plevel + 1;