MySQL showing total members in factions/online members.
#5

Use this:
Quote:
Originally Posted by Vince
Посмотреть сообщение
PHP код:
SELECT a.factionidf.NameCOUNT(a.factionid) AS memberCount FROM Accounts a INNER JOIN Faction f ON f.ID a.factionid GROUP BY a.factionidf.Name 
@Vince, I tried it on a database and it did work. It's amazing how powerful the SQLanguage is.

And then inside of the callback, use:
Код:
cache_get_field_content_int(row, "memberCount", handle);
or
cache_get_row_int(row, 2, handle);
The second one is faster, but the number 2 changes depending on how many fields you're fetching.
Both of them will return the member count.

Also, don't bump before 24 hours.
The rules are in every section of the forum for a reason.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)