24.07.2013, 19:45
Quote:
"r" stands for "Result-ID".
sql_query returns the result, but i can't give OnPlayerLogin the result id, if sql_query has to be executed first. This is the reason, why i have to write down two format parameters but only one variable. Later I use the result id ("queryid") in OnPlayerLogin |
Example:
pawn Code:
foward MySQLCallback(Result: sqlresult);
public MySQLCallback(Result: sqlresult)
{
// Do something with the result here...
}
// Somewhere in your script where the query should be executed:
sql_query(connection, query, QUERY_CACHED | QUERY_THREADED, "MySQLCallback", "r");
Great release, after using it for a little bit I have to say that its really good.
I would like to see some more documentation on this plugin however.
Good work
![Smiley](images/smilies/smile.png)
EDIT: I actually wanted to ask a question about sql_wait.
What does it actually do? prevent from any other queries to be executed, or hang the server? (till all activity is over)