Welcome to FindNerd, today we are going to discuss on display error messages from mysql response in Cakephp 2.5.6 .
Sometime you need show sql error messages to users when you get duplicate entries from database. Suppose you are developing a web application in cakephp then, if any duplicate entries exist in database then it will show following message to the user.
It is not good way to show duplicity error from database. If you want to show proper message then you have to show proper error display message and set a view page. So to show error message on view page you have to pass information from the controller.
So after set view page you can display a proper message to users which you want to set on view page.