Jump to content
php.lv forumi

Kļūda kverijā


nemakuphp

Recommended Posts

Nevaru saprast, kurā vietā ir kļūda.

 

Kverijs ir šāds

mysql_query("INSERT INTO users(user_nick, user_password, user_salt, user_email, user_joined, user_lastseen, user_join_ip, group) VALUES('".$this->username."', '".$this->password."', '".$this->salt."', '".$this->email."', '".time()."', '".time()."', '".$this->ip."', '1')") or die (mysql_error());

 

Kļūda

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 'group) VALUES('test', 'c707292fba4345bf4a11bb5d2c70d47bf5980f8e', 'ZKzxHhFkP5',' at line 1

 

Ja es izvadu to, ko lieku iekš query iznāk šāds

INSERT INTO users(user_nick, user_password, user_salt, user_email, user_joined, user_lastseen, user_join_ip, group) VALUES('test', 'c707292fba4345bf4a11bb5d2c70d47bf5980f8e', 'ZKzxHhFkP5', 'test@test.test', '1270056948', '1270056948', '127.0.0.1', '1')

 

Visi mainīgie tiek laisti caur mysql_real_escape_string

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...