Fatal error: Uncaught mysqli_sql_exception: Cannot add or update a child row: a foreign key constraint fails (`cmscore_reserves2`.`continguts_lectures`, CONSTRAINT `continguts_lectures_ibfk_1` FOREIGN KEY (`id_contingut`) REFERENCES `continguts` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE) in /cms8.core/classr/DataBaseReserves.class.php:25 Stack trace: #0 /cms8.core/classr/DataBaseReserves.class.php(25): mysqli->query('Insert into con...') #1 /cms8.core/classr/continguts_lectures.class.php(83): DataBaseReserves->RunQuery('Insert into con...') #2 /home/ireserva/public_html/mod/page.php(153): continguts_lectures->Insert_lectura(NULL, '13.59.2.242', 'cat') #3 /home/ireserva/public_html/index.php(257): include('/home/ireserva/...') #4 {main} thrown in /cms8.core/classr/DataBaseReserves.class.php on line 25