SQL syntax error
#1

I have a problem with this lines

Код:
format(query, sizeof(query), "INSERT INTO `accounts` (`username`,`spassword`,`emailaddress`,`ipaddress`) VALUES ('%s', '%s', '%s', '%s')", Cname, Cpassword, Cemail, Cipaddress); 
mysql_query(query);
Error:
Код:
CMySQLHandler::Query(INSERT INTO `accounts` (`username`,`spassword`,`emailaddress`,`ipaddress`) VALUES ('Battleman', 'examplepassword', 'example@mail.com', '192.168.1) - 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 ''192.168.1' at line 1)
I don't know how to fix this. Anybody?
Reply


Messages In This Thread
SQL syntax error - by BritishBoy - 28.04.2011, 20:55
Re: SQL syntax error - by [L3th4l] - 28.04.2011, 21:02
Re: SQL syntax error - by X3nZ - 29.04.2011, 00:35

Forum Jump:


Users browsing this thread: 2 Guest(s)