I am trying to enter registration info into a mysql db through php, but the sql statement seems wrong. Can anyone please tell me what am I doing wrong?
INSERT INTO user(id,username,password,email,security_question,security_answer,face_photo,body_photo,user_salutation,user_firstname,user_middlename,user_lastname,parent_salutation,parent_firstname,parent_middlename,parent_lastname,gender,date_of_birth,address1,address2,country,state,city,pincode,country_code1,area_code1,phone1,country_code2,area_code2,phone2,alt_email,website,travel_within,passport,travel_companion,formal_education,other_qualification,known_languages,hobbies,about_you) VALUES('',some username,abcabc,abc@test.com,What is your first pet\'s name?,I don\'t know,'','',Mr.,sam,,fisher,Mr.,,,,Male,05/12/2009,开发者_JAVA百科test address1,,10,1073,16713,000000,00,00,00000000,,,,bcd@test.com,bcd@test.com,Within Country,on,on,none,none,spanish,none,none )
You don't have quotes around any of your string values:
..... ) VALUES('', 'some username', 'abcabc', 'abc@test.com'..... etc...
精彩评论