mysql error
#1

HTML Code:
new query[400];
mysql_format(SQL,query,500,"INSERT INTO `factions_chat` (`text`,`playerid`,`factionid`) VALUES ('%s','%d','%d')",string,PlayerInfo[playerid][pSQLID],PlayerInfo[playerid][pMember]);
mysql_tquery(SQL,query,"","");



error:
(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 'ca eu atunci am iesit','1200','8')' at line 1 (Query: "INSERT INTO `factions_chat` (`text`,`playerid`,`factionid`) VALUES ('(Faction Las Venturas Police Department) ()x(): numa' ca eu atunci am iesit','1200','8')")
Reply
#2

Use %e instead of %s. It escapes the ' sign.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)