Posts: 234
Threads: 11
Joined: Jan 2018
Reputation:
0
Print the result of the query.
Posts: 2,593
Threads: 34
Joined: Dec 2007
You need use callback for tquery or Cache with old style to mysql_query
also use LIMIT 1 in query and %e instead of %s if you need mysql_format
pawn Код:
new Cache:result = mysql_query(g_SQL, query);
new rows = cache_num_rows();
cache_delete(result);
return rows;
Posts: 416
Threads: 47
Joined: May 2011
Reputation:
0
Couple more tips; escape your string to avoid SQL injection. Use %e instead of %s for mysql formats
Also limit the result. Use LIMIT 1 at the end of your mysql query. You don't have to find more than 1 result.