Mysql errors are among the most common ones you see during development, and I am searching for a pleasant and informative way to output them.
phpMyAdmin apparently has a decent pretty-printer for mySQL queries:
parsed query http://img706.imageshack.us/img706/2873/clipboard02a.png
However, it prints errors as simple text:
error output http://img683.imageshack.us/img683/1577/clipboard03g.png
Whereas in the latter example, the text after for the right syntax to use near could have been highlighted in the query. Like this:
alt text http://img710.imageshack.us/img710/2839/clipboard03z.png
Even though it’s a short query, you immediately see there’s a surplus comma right before the text. Doing so in much larger queries could increase readability dramatically, I’m surprised numerous searches on the subject came up with nothing.
Question in one sentence: Do you use or know of any such PHP class that displays pretty mysql errors for debugging purposes?
I’m not sure whether this would work..
All the error messages from mysql are rendered from this file only share/errmsg.txt
Error message information is listed in the share/errmsg.txt file. %d and %s represent numbers and strings, respectively, that are substituted into the Message values when they are displayed.
A sample error message would be , %s near ‘%s’ at line %d
so if we can add something in all the error messages at errmsg.txt , then we can check for the matching string in the string returned by php mysql_error function then make them bold or italic..
I think there is no specific class wrote before..
You should go from scratch and make it to your own server.