native SQL_ThreadQuery(Handle:db_tuple, const handler, const query, const data="", dataSize=0);
- One of the three TQUERY_ defines.
- Handle to the query, do not free it.
- An error message, if any.
- An error code, if any.
- Data array you passed in.
- Size of the data array you passed in.
- Amount of gametime that passed while the query was resolving. public QueryHandler(failstate, Handle:query, error, errnum, data, size, Float:queuetime) Note! The handle you pass in is a DB Tuple, NOT an active connection! Note! The handle does not need to be freed. Also note: This function is not guaranteed to be in another thread (in fact - it's not). You're seeing data "after the fact", and as such to execute another query you should run SQL_ThreadQuery again with new data.
Prepares and executes a threaded query. This will not interrupt gameplay in the event of a poor/lossed connection, however, the interface is more complicated and asynchronous. Furthermore, a new connection/disconnection is made for each query to simplify driver support. The handler should look like: