24.09.2016, 16:33
If you only need a count of something then you should use the COUNT() aggregate function. This is much more efficient than getting the row count because only a single value is sent instead of the entire result set.
This value can then simply be retrieved with (assuming R40) cache_get_value_index_int().
PHP код:
SELECT COUNT(*) FROM players WHERE Member = %d