MySQL R7 - cache_get_row.
#1

Hey.
I have this code:
PHP код:
stock GetSQLPInt(value[], name[])
{
    new 
query3[500];
    
format(query3, sizeof(query3), "SELECT `%s` FROM `users` WHERE `User`='%s'", value, name);
    
mysql_function_query(cHandle, query3, false, "", "");
    
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?
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)