best way to save kills per weapontype in mysql - 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: best way to save kills per weapontype in mysql (
/showthread.php?tid=584131)
best way to save kills per weapontype in mysql -
PizzaPuntjes - 02.08.2015
well,, as the titel says; how can i save kills per weaponid of a user the most efficient?
i have no idea so thats why i am coming here
Re: best way to save kills per weapontype in mysql -
Scenario - 02.08.2015
What exactly do you mean by
weaponid? Do you mean the ID that signifies what weapon was used to kill a player?
Re: best way to save kills per weapontype in mysql -
xVIP3Rx - 02.08.2015
What database system are you using, SQL or Files ?
Re: best way to save kills per weapontype in mysql -
Vince - 02.08.2015
Table: userid - weaponid - killed, with userid and weaponid as the composite primary key.
Query to add kills:
PHP код:
INSERT INTO table (userid, weaponid, killed) VALUES (%d, %d, %d) ON DUPLICATE KEY UPDATE killed = killed + %d
Re: best way to save kills per weapontype in mysql -
PizzaPuntjes - 02.08.2015
Thank you a lot,