Thread: [Solved] [MySQL] Return function
View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-09-2022 , 08:44   Re: [MySQL] Return function
Reply With Quote #3

Quote:
Originally Posted by Shadows Adi View Post
Instead of using SQL_ThreadQuery, use SQL_Execute. You will.need to prepare the query using Sql_PrepareQuery
You should mention that this will execute the queries in synchronous/blocking mode which will block the main thread until the query is completed. Generally, this isn't something you want to do.

Threaded queries are better to use in a live game for this reason, but due to their asynchronous nature, one can not do what OP wants because when the SQL_ThreadQuery returns there is no guarantee the query was actually executed. The callback is meant to serve as a notification that the query is done and results are available.
__________________
HamletEagle is offline