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 );
}
}
__________________