help mysql in amxx prob
Hey im using amx to communicate with mysql server to do some checkings.
how ever it causes some stacks and lags , it's a while that loops all players in the server and query the sql for each player . this loop might cause this stacks. i wonder if there is any function that can delay or sleep the code for 100ms or somthing like this to depress the lags. code: Code:
g_SqlTuple = SQL_MakeDbTuple(Host,User,Pass,Db)any suggestions to solve the lags? |
Re: help mysql in amxx prob
Use threaded queries.
http://forums.alliedmods.net/showthr...highlight=sqlx |
Re: help mysql in amxx prob
Also, you want to use SQL_NumResults() when checking the results of a SELECT query. SQL_AffectedRows() only refers to operations that actually change records, such as UPDATE, INSERT, etc.
EDIT: Actually, the whole thing could be rewritten into a single query, if you're interested. |
| All times are GMT -4. The time now is 17:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.