Help MySQL R7
#1

Hello,Do you know how to count Mysql r7 with return? How get value from the callback function of mysql and after return in the general function.
Reply
#2

PHP код:
stock fetchCount(playerid)
{
    
mysql_function_query(handle"SELECT COUNT(*) FROM `table`"true"OnCountRetrieve""i"playerid);
    return 
1;
}

forward OnCountRetrieve(playerid);
public 
OnCountRetrieve(playerid)
{
    new 
content[10];
    
cache_get_field_content(0"COUNT(*)"contenthandle);
    
    new 
string[128];
    
    
format(stringsizeof(string), "The table has %d rows inside it."strval(content));
    
SendClientMessage(playerid, -1string);
    return 
1;

If that's not what you mean, then be more specific, I'd be glad to help you out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)