mysql count
#1

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:

Код:
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
Reply


Messages In This Thread
mysql count - by jeffery30162 - 18.01.2015, 23:42
Re: mysql count - by CoaPsyFactor - 18.01.2015, 23:47
Re: mysql count - by jeffery30162 - 19.01.2015, 00:04
Re: mysql count - by jeffery30162 - 19.01.2015, 00:49
Re: mysql count - by PaulDinam - 19.01.2015, 01:57
Re: mysql count - by CoaPsyFactor - 19.01.2015, 02:10
Re: mysql count - by CoaPsyFactor - 19.01.2015, 02:12
Re: mysql count - by PowerPC603 - 19.01.2015, 06:42
Re: mysql count - by jeffery30162 - 19.01.2015, 19:16
Re: mysql count - by jeffery30162 - 19.01.2015, 19:23

Forum Jump:


Users browsing this thread: 1 Guest(s)