MySQL problem : How to get the data ?!
#1

Hi everyone,

I'm lost with the new cache system for MySQL, here is my code :

Код:
mysql_function_query(g_Handle, "SELECT COUNT(*) FROM `vehicles`", true, "GetNumberOfColumns","");
I have 2 columns in my vehicles table, so this function should return 2 as result data, but where is this data stored ? And how can I get it ?

I tried this :

Код:
forward GetNumberOfColumns();
public GetNumberOfColumns()
{
	new rows, fields;
        cache_get_data(rows, fields);

	new String[15];
	format(String,sizeof(String),"%i %i",rows,fields);
	SendClientMessageToAll(-1,String);
}
This writes "1 1" ingame none of the two variables are correct because the query should return the data 2

I'm lost can anyone help me ?

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)