SA-MP Forums Archive
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(MySQLConszQuerysizeof(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      |        |
3      |        |
+---+------+----+ 
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      |        |
1      |        |
2      |        |
3      |        |
4      |        |
5      |        |
6      |        |
+---+------+----+ 
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