Posted: 07/14/2020, 9:09 AM |
|
I am trying to check db error displaying custom message when there is db sql errors.
found this solution on ccs Quote :http://forums.yessoftware.com/posts.php?post_id=124762 but i am getting Quote :Undefined offset Errors on php 7.3
// Check if DB Errors contain a Foreign key contrsaint violation when deleting a row
if (strpos($myForm->DataSource->Errors->Errors[0],"foreign key constraint fails")>0) {
// Replace with custom message
$myForm->DataSource->Errors->Errors[0] = "My custom Message";
}
is there other solutions to check DB Errors and displaying custom message
|