Forget it, I fixed that problem myself, but now I have a new one
When I try and get information from the SQL db and place it into one of my variables thats what it writes:
PHP код:
[Sun Jul 10 18:59:02 2011] Error (0): Function: mysql_store_result called when no prior successful query executed.
[Sun Jul 10 18:59:02 2011] Error (0): Function: mysql_store_result called when no result stored.
How did I try and get and put:
PHP код:
PlayerInfo[playerid][pJob] = mysql_Int(SQL_USERS,PlayerInfo[playerid][pUID],"job");
mysql_Int function is something I built:
PHP код:
stock mysql_Int(table[],id,key[])
{
return strval(mysql_Get(table,id,key));
}
mysql_Get:
PHP код:
stock mysql_Get(table[],id,key[])
{
Query("SELECT `%s` FROM `%s` WHERE `userid` = '%d'",key,table,id);
new Result[30];
mysql_fetch_row_format(Result);
return Result;
}
mysql_fetch_row_format:
PHP код:
#define mysql_fetch_row_format(%1) mysql_fetch_row(%1,"|")
Query:
PHP код:
new F = false;
#if defined Query
#else
#define Query(%1,%2) do { new formatStr[256]; format(formatStr,sizeof(formatStr),%1,%2); if(SQL_Connection) mysql_query(formatStr); mysql_store_result(); } while(F)
#endif
#pragma unused F
I use StrickenKid's plugin and all the mysql_Get & mysql_Int are inside the "mysql.inc" file.