Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`fotosdem_fotos`.`producto_tracker`, CONSTRAINT `producto_tracker_ibfk_1` FOREIGN KEY (`producto`) REFERENCES `producto` (`codigo`) ON DELETE CASCADE ON UPDATE CASCADE) in /home/fotosdem/public_html/Conexion_BD.php:69
Stack trace:
#0 /home/fotosdem/public_html/Conexion_BD.php(69): PDO->query('INSERT INTO pro...')
#1 /home/fotosdem/public_html/Conexion_BD.php(154): Consulta->Hacer_Consulta('INSERT INTO pro...')
#2 /home/fotosdem/public_html/producto.php(219): HacerConsultaQuery('INSERT INTO pro...')
#3 /home/fotosdem/public_html/producto.php(255): product->add_statistic()
#4 /home/fotosdem/public_html/Funciones_Generales.php(1873): include('/home/fotosdem/...')
#5 /home/fotosdem/public_html/fotografia/index.php(23): include_once('/home/fotosdem/...')
#6 {main}
thrown in /home/fotosdem/public_html/Conexion_BD.php on line 69