Mysql Help
#1

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
Reply
#2

Do you have the factions defined elsewhere in your database? Else it won't be possible.
Reply
#3

yes i have
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)