Posts Tagged ‘PDOException

Problem:

I was setting up a database query using a PDOStatement, by looping through an array of values and binding each parameter seperately. But on executing the query, I got the following error:

Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[HY000]: General error: 1452 Cannot add or update a child row: a foreign key constraint fails (`places/places`, CONSTRAINT `places_ibfk_3` FOREIGN KEY (`login_id`) REFERENCES `login` (`id`) ON DELETE CASCADE)’ in G:….

Continue reading »


About this blog

Based in South Africa, we're a web-development company...