SA-MP Forums Archive
MySQL R7 - cache_get_row. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL R7 - cache_get_row. (/showthread.php?tid=444007)



MySQL R7 - cache_get_row. - Activest - 14.06.2013

Hey.
I have this code:
PHP код:
stock GetSQLPInt(value[], name[])
{
    new 
query3[500];
    
format(query3sizeof(query3), "SELECT `%s` FROM `users` WHERE `User`='%s'"valuename);
    
mysql_function_query(cHandlequery3false"""");
    
mysql_store_result();
    new 
values mysql_fetch_int();
    
mysql_free_result();
    return 
values;

I want to change my mode to R7, but I don't know how to load the data that I choose.
It's working like:
PHP код:
GetSQLPInt("Money""Name"); 
Can you help me?


Re: MySQL R7 - cache_get_row. - IstuntmanI - 14.06.2013

You can't use functions like that in R7, because it doesn't uses non-threaded queries anymore, they were removed. You have to make them threaded (directly in code, not with functions like the one you shown us). (call a callback in mysql_function_query and use cache functions in callback).

EDIT: Take a look there: https://sampforum.blast.hk/showthread.php?tid=337810