stock IsRemont(playerid) { new Query [ 100 ]; format( Query,sizeof( Query ),"SELECT * FROM `RemontCars` WHERE `Owner` = '%s'",PlayerName(playerid)); mysql_query( Query ); mysql_store_result( ); if( mysql_num_rows( )==0 ) { PlayerData[ playerid ][ Remont] = 0; } else if(mysql_num_rows( ) !=0 ) { PlayerData[ playerid ][ Remont] = 1; } mysql_free_result( ); }
IsRemont(playerid); format(Query, sizeof(Query),"UPDATE `playerdata` SET `Remont` = '%d' WHERE `Name` = '%s'",PlayerData[playerid][Remont],PlayerName(playerid)); mysql_query(Query);
mysql_fetch_field_row( savingstring, "Remont"); PlayerData[ playerid ][ Remont] = strval(savingstring);
[10:19:52] >> mysql_fetch_field_row( Connection handle: 1 ) [10:19:52] CMySQLHandler::FetchField("Remont") -
[11:30:11] CMySQLHandler::Query(SELECT * FROM RemontCars WHERE Owner` = 'Nestea') - An error has occured. (Error ID: 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 '` = 'Nestea'' at line 1)
Fixed. Anyway thanks for try helping.Now other problem with mysql formating:
format(QueryS, sizeof(QueryS),"SELECT * FROM RemontCars WHERE Owner= '%s'",PlayerName(playerid)); And i get error in log: Код:
[11:30:11] CMySQLHandler::Query(SELECT * FROM RemontCars WHERE Owner` = 'Nestea') - An error has occured. (Error ID: 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 '` = 'Nestea'' at line 1) |