Jump to content


This topic is now archived and is closed to further replies.


Catching Error Codes/Custom errors

Recommended Posts

Has anyone worked with error codes on MSSQL/PHP

Ok if there is an error in the query, it shows something like this

Warning: mssql_query() [function.mssql-query]: message: Violation of UNIQUE KEY constraint 'IX_categories'. Cannot insert duplicate key in object 'categories'. (severity 14) in c:\Inetpub\wwwroot\vault\createcats.php on line 26

Is there a way to display a custom message instead of the system generated message? like "Duplicate Category Found in the Database, Please go back and enter a new category"

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.