SA-MP Forums Archive
Mysql query help - 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: Mysql query help (/showthread.php?tid=650575)



Mysql query help - ajwar - 02.03.2018

Hello, i want to send a message to SendClientMessageToAll which displays total amount of money all players own.

Mysql SUM() function?

Table : players
row: cash


Re: Mysql query help - AroseKhanNiazi - 03.03.2018

SELECT SUM(cash) FROM players

cache_get_value_index_int(0,0,var_sum); // < R40
cache_get_value_index_int(0, 0,var_sum)// > R40