#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    4
    Rep Power
    0

    mysql: getting error description from error code


    Hello guys,

    I'd like to know if there is a way to get the error description of mysql from its error code.

    Example: I run a query that returns me and error. Let's say, I get error code 1054. Then I'd like to redirect the user to the fething data page with the error code set to 1054, and then I would display the error message according to the error.

    Question is, "Is there a way to retrieve the error message from its error code?"

    Like $error_message=errorCode(1054); in this example?

    Thanks
  2. #2
  3. Webmaster Extraordinaire
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    Woburn, MA
    Posts
    126
    Rep Power
    18
    Try this out. You could use it in tandem with mysql_errno().
    Craig Anderson

IMN logo majestic logo threadwatch logo seochat tools logo