Raised This Month: $ Target: $400
 0% 

Solved [MySQL] Return function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-09-2022 , 10:22   Re: [MySQL] Return function
Reply With Quote #7

No, it is not correct. Let me try to explain again using your code:

PHP Code:
new VarTest

public SqlGetUserIndex(id)
{
    
SQL_ThreadQuery(handle"_SqlGetUserIndex""SELECT id FROM users WHERE authid = 'STEAM_XXXXXXXX'"//when this finishes executing the query is not guaranteed to be completed

    
return VarTest //this can be executed BEFORE _SqlGetUserIndex has a chance to be called and set VarTest, it will likely return 0 or the result from a previous query

__________________
HamletEagle is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode