MYSQL cache
#1

I have this return and error code, wat's wrong?

Код:
ReturnOfflineName(id)
{
	new query[128], name[MAX_PLAYER_NAME + 1];

    format(query, sizeof(query), "SELECT `Character` FROM `characters` WHERE `ID` = '%d'", id);
	mysql_function_query(g_iHandle, query, false, "", "");
	
	static
	    rows,
	    fields;
	    
	//cache_get_data(rows, fields, g_iHandle);

	cache_get_field_content(0, "Character", name);

	return name;
}
Код:
[14:26:09] >> mysql_query_callback( Connection handle: 1 )
[14:26:09] >> cache_get_data( Connection handle: 1 )
[14:26:09] CMySQLHandler::ProcessQueryThread() - Reconnection attempt in background thread.
[14:26:09] CMySQLHandler::Connect() - Connection was successful.
[14:26:09] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[14:26:09] Passing query SELECT `Character` FROM `characters` WHERE `ID` = '1' | 
[14:26:09] ProcessQueryThread() - Query was successful. (SELECT `Character` FROM `characters` WHERE `ID` = '1')
[14:26:09] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
Reply
#2

You need a callback. Structures like these aren't possible in the new plugins.
Reply
#3

And how it's possible?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)