PHP код:
format( g_szBuffer, 500, g_szBuffer, "SELECT * FROM users WHERE WorkId > '-1");
new Cache:Data = mysql_query( dbHandle, g_szBuffer, true );
new num = cache_num_rows();
new wName[MAX_PLAYER_NAME], jobId, wWarns, wContract, str[220], fstr[500], dStatus[20];
for( new i; i < num; i++ ){
jobId = cache_get_field_content_int( i, "WorkId" );
wWarns = cache_get_field_content_int( i, "WorkWarns" );
wContract = cache_get_field_content_int( i, "WorkContract" );
cache_get_field_content( i, "pName", wName );
if(player[playerid][pWorkLeader] == jobId)
{
if(GetPlayeridMid(wName) != INVALID_PLAYER_ID) { dStatus = "prisijungęs"; } else { dStatus = "atsijunges"; }
format(str, sizeof(str),"%s, %i, %s \n", wName, wWarns, likusdata(wContract));
strcat(fstr, str);
}
}
if(!num)
SendError(playerid, "jūsų frakcijoje nėra darbuotojų !"); // There is no players detected
ShowPlayerDialog(playerid,870,DIALOG_STYLE_LIST,"Darbuotojas, įsp. skaičius, liko kontrakto",fstr,"Rinktis","Atgal");
cache_delete( Data );
I dont know why but mysql dont get him and I hate it because it doesn't show as a normal error.
PHP код:
[00:18:55] [ERROR] CMySQLQuery::Execute[()] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '„El Quebrados Medikitas“ frakcija' at line 1
[00:18:55] [WARNING] cache_get_row_count - no active cache
[00:18:55] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result ID ('0')
This text is shown on 3dtextlabel I dont understand why is he in the error.