[SOLVED] Â How to pick and customize the content of a message passed by MySQL? |
4/29/2015 7:07:10 PM |
PHPRunner General questions | |
A
Aruanan author
Hi, All!.... (...sorry for my weak English! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=23118&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' /> ) |
|
![]() |
Sergey Kornilov admin 4/29/2015 |
You cannot intercept those messages but even if you could that would be a bad idea. Your customers won't understand what "Duplicate entry '1-1-01' for key 'um'" means or how to fix it. |
A
|
Aruanan author 4/30/2015 |
You cannot intercept those messages but even if you could that would be a bad idea. Your customers won't understand what "Duplicate entry '1-1-01' for key 'um'" means or how to fix it. Correct approach is to avoid errors like this. If you allow users to enter foreign or primary key field values manually implement BeforeEdit/BeforeAdd event and check field value for uniqueness there. If duplicate detected tell them in plain Spanish what needs to be changed. Better yet, change your application the way users don't need to enter any foreign or primary key field values manually.
|