nemakuphp Posted March 31, 2010 Report Share Posted March 31, 2010 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 More sharing options...
Aleksejs Posted March 31, 2010 Report Share Posted March 31, 2010 GROUP manuprāt ir rezervētais vārds... pamēģini: INSERT INTO users(user_nick, user_password, user_salt, user_email, user_joined, user_lastseen, user_join_ip, `group`)... Link to comment Share on other sites More sharing options...
nemakuphp Posted March 31, 2010 Author Report Share Posted March 31, 2010 Paldies, viss sanāca Link to comment Share on other sites More sharing options...
Recommended Posts