HughbertD Posted March 13, 2008 Share Posted March 13, 2008 Hi all, I was wondering if there was a way of catching the foreign key constraint error from MYSQL in PHP. I want to inform the user, that they need to change the values of a row in order to delete it. Thanks for any help Link to comment https://forums.phpfreaks.com/topic/95954-catching-specific-mysql-errors/ Share on other sites More sharing options...
BlueSkyIS Posted March 13, 2008 Share Posted March 13, 2008 you could try to execute the query and load any errors using mysql_error(), but i would run a select query to check instead of having mysql return an error. Link to comment https://forums.phpfreaks.com/topic/95954-catching-specific-mysql-errors/#findComment-491267 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.