Thread: [Solved] [MySQL] Return function
View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-10-2022 , 22:35   Re: [MySQL] Return function
Reply With Quote #10

Not sure what the standard method means, but you want to avoid using an execute query as it will cause lags, if this is what you are referring to.

I gave you an idea in my code snippet. You can execute the handler function once the result is determined:
Code:
public _SqlGetUserIndex(fail_state, Handle:query, error[], error_code, data[], data_size) {     // check fails, etc....         new id = data[0]         if(SQL_NumResults(query))     {         VarTest[id] = SQL_ReadResult(xQuery, 0)
        UserFound( id );
    }     else     {         VarTest[id] = -1
        UserNotFound( id );
    } }
__________________
Bugsy is offline