23.11.2017, 20:43
Hello!
What is better to use, this:
or this:
to get count of results?
And another question: what, if I only want to know if a record just exists?
Thanks for your reply
What is better to use, this:
Код:
new DBResult:result = db_query(db, "SELECT COUNT(0) FROM players"); new count = db_get_field_int(result); db_free_result(result);
Код:
new DBResult:result = db_query(db, "SELECT NULL FROM players"); new count = db_num_rows(result); db_free_result(result);
And another question: what, if I only want to know if a record just exists?
Thanks for your reply