Mysql Error
#1

I have a problem in my SQL code,can you help me,please?
Код:
		new Query[ 3000 ], sendername[MAX_PLAYER_NAME], playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(id, playername, sizeof(playername));
        format( Query, sizeof( Query ), "INSERT INFO `fines` (Politist, Pret, Pentru, Posesor) VALUES('%s', '%d', '%s', '%s')",
		playername, price, reason, sendername);
        mysql_query( Query );
Quote:

[22:54:17] MySQL Error (0): Could not execute query. 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 '`fines` (Politist, Pret, Pentru, Posesor) VALUES('Beltramo_Cusimano', '0', 'test' at line 1.

Reply
#2

Hi Dominic123,

Try changing:
Код:
INSERT INFO `fines` (Politist, Pret, Pentru, Posesor) VALUES('%s', '%d', '%s', '%s')
to:
Код:
INSERT INTO `fines` (Politist, Pret, Pentru, Posesor) VALUES('%s', '%d', '%s', '%s')
Reply
#3

LOL xd,i don't see INFO,thank you dude.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)