2014-11-15 72 views
0

當我運行的phpmyadmin那麼下面的查詢它給了我下面的錯誤SQL查詢不運行

INSERT INTO `infrastructure_support_info`(`s_no`, `student_no`, `books_availability`, `basic_requirements`, `technological_support`, `study_material`, `resource_availability`, `cleaniliness_of_class`) 
VALUES ('', '', '$availabilityOfBooks', '$basicRequirements', '$technologicalSupport', '$photocopyOfStudyMaterial', '$availabilityOfOtherResources', '$cleanlinessOfClass') 

#1452 - 不能添加或更新子行,外鍵約束失敗(feedback_system_dbinfrastructure_support_info。 ,約束user_std_no外鍵(student_no)參考文獻user_masterstudent_no))

回答

2

表具有到另一個的引用。如果您想將該鏈接留空,請使用null而不是空白字符串''