display foreign key error message

Hi
how can i customize the error message when a user try to delete a record if there is a foreign key?

Now, the message is getting from database and it is not user friendly

thanks

If this is due to generated code then it will be hard. What you might try is to set a debug trap of your own like in : set_error_handler(“customError”);
See php manual for description.