An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds....
#1

pawn Code:
format(Query, sizeof(Query), "INSERT INTO `houses` (`hID`, `Owned`, `Owner`, `Discription`, `EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `Level`, `Value`, `Healthx`, `Armourx`, `Hel`, `Arm`,`Int`,`Lock`,`Rooms`,`Rent`,`Rentabil`,`Takings) VALUES (%d, 0, 'The State', %s,%f,%f,%f,%f,%f,%f,%d,%d,0,0,0,0,%d,1,0,0,0,0)",
hid,Description,EntX,EntY,EntZ,ExitX,ExitY,ExitZ,Level,Value,Int);
mysql_query(Query);
Mysql Error
Code:
[23:47:41] CMySQLHandler::Query(INSERT INTO `houses` (`hID`, `Owned`, `Owner`, `Discription`, `EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `Level`, `Value`, `Healthx`, `Armourx`, `Hel`, `Arm`,`Int`,`Lock`,`Rooms`,`Rent`,`Rentabil`,`Takings) VALUES (2, 0, 'The State', Patara Saxli,1532.328247,-1694.320800,13.382812,225.756988,1240.000000,1082.149902,4,50000,0,0,0,0,2,1,0,0,0,0)) - 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 '' at line 1)
Reply
#2

you forgot some quotes in it

Code:
format(Query, sizeof(Query), "INSERT INTO `houses` (`hID`, `Owned`, `Owner`, `Discription`, `EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `Level`, `Value`, `Healthx`, `Armourx`, `Hel`, `Arm`,`Int`,`Lock`,`Rooms`,`Rent`,`Rentabil`,`Takings`) VALUES (%d, 0, 'The State', `%s`,%f,%f,%f,%f,%f,%f,%d,%d,0,0,0,0,%d,1,0,0,0,0)",
hid,Description,EntX,EntY,EntZ,ExitX,ExitY,ExitZ,Level,Value,Int);
mysql_query(Query);
NOTE: Mistakes are marked in bold

NOTE2: i guess you made a typo in the query in INSERT INTO (at Discription , it should be Description )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)