dimanche 18 janvier 2015

mysql count

I want to find out how many objects a player has by using the count mechanism on mysql to count the number of rows that the players name comes up in the colum owner in the table objects.





Im not very good with mysql but this is what i could come up with idk if it will help you or not but here it is:




Code:



new query[300];

mysql_format(MySQLCon, query, sizeof(query), "SELECT COUNT(*) FROM objects WHERE Owner = '%s';",ObjectInfo[idxo][oOwner]);

mysql_query(MySQLCon, query);



Please fix for I can find out how many objects the player owns.



Thnak you




Aucun commentaire:

Enregistrer un commentaire