[eluser]rainfall[/eluser]
This problem occurred when i trying to insert data in tbl_add_designation table
Code:
Error Number: 1452
Cannot add or update a child row: a foreign key constraint fails (`db_erp_hr`.`tbl_add_designation`, CONSTRAINT `FK1_designation` FOREIGN KEY (`dept_id`) REFERENCES `tbl_add_department` (`dept_id`))
INSERT INTO `tbl_add_designation` (`desig_name`, `dept_name`) VALUES ('IT Officer', 'Admin ')
detp_id is the foreign key for department table .
How to solve it ??