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
#2

Increase the size of
pawn Код:
new
    query[];
Reply
#3

Код:
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)
You didn't include the last .1 or what ever it is for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)