16.03.2014, 09:10
I want to get all the names and ranks form players in the database that are members of the same gang.
"CLAN" means member
i have written this code but its not working.
"CLAN" means member
i have written this code but its not working.
Код:
stock SviClanovi(playerid, idorg) { new DBResult: Result, Field1[22], Field2[22], Query[350], string[256]; format(Query, sizeof(Query), "SELECT * FROM USERS WHERE CLAN = %d GROUP BY Name HAVING count(*) >= 1", idorg); Result = db_query(Database, Query); do { db_get_field_assoc(Result, "NAME", Field1, 30); db_get_field_assoc(Result, "RANK", Field2, 30); format(string,sizeof(string) , "| %s | %s", Field1, Field2); SCM(playerid, -1, string); } while(db_next_row(Result)); db_free_result(Result); return true; }