29.09.2010, 00:15
So yeah, I'm trying to set the 3dlabels save and load from mysql ( don't ask why )
Here is the save function:
Here is the error:
Not sure why I'm getting that error :<
EDIT: If needed:
Here is the save function:
pawn Код:
stock AddLabelToFile(LabelInfo[], Float:LX, Float:LY, Float:LZ)
{
new Query[400];
format(Query, sizeof(Query), "INSERT INTO `labels` (LabelX, LabelY, LabelZ, LabelInfo) VALUES(%f, %f, %f, %s)",
LX, LY, LZ, LabelInfo);
mysql_query(Query);
mysql_free_result();
return 1;
}
Код:
[19:17:06] CMySQLHandler::Query(INSERT INTO `labels` (LabelX, LabelY, LabelZ, LabelInfo) VALUES(-1265.670532, -2117.095947, 25.773883, testing this string, see if it saves :o)) - 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 'this string, see if it saves :o)' at line 1)
EDIT: If needed:
Код:
-- -------------------------------------------------------- -- -- Table structure for table `labels` -- CREATE TABLE IF NOT EXISTS `labels` ( `LabelX` float NOT NULL, `LabelY` float NOT NULL, `LabelZ` float NOT NULL, `LabelInfo` varchar(128) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `labels` --