Mysql 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 Help (
/showthread.php?tid=584840)
Mysql Help -
muhsah007 - 08.08.2015
PHP код:
mysql_format(MySQLCon, szQuery, sizeof(szQuery), "select Faction, count(*) from players GROUP BY Faction");
This mysql code is working but its not giving me the result which i need ?
it shows like this
PHP код:
+---+------+----+
| Faction | COUNT(*) |
+---+------+----+
| 2 | 1 |
| 3 | 2 |
+---+------+----+
this code does'nt show the empty factions like 0 1 4 5 6
i want a mysql code to give me result like this
PHP код:
+---+------+----+
| Faction | COUNT(*) |
+---+------+----+
| 0 | 0 |
| 1 | 0 |
| 2 | 1 |
| 3 | 2 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
+---+------+----+
please help me
Re: Mysql Help -
Vince - 08.08.2015
Do you have the factions defined elsewhere in your database? Else it won't be possible.
Re: Mysql Help -
muhsah007 - 08.08.2015
yes i have
Re: Mysql Help -
muhsah007 - 08.08.2015
Quote:
Originally Posted by Vince
Do you have the factions defined elsewhere in your database? Else it won't be possible.
|
help me please fast