Please, How do I make to get all errors of MySql ?

I'm making a function for translate all errors. Example:

function TranslateErrors($err)
{
   global $result;
   global $text;
   Switch ($err)
   {
      case 1045 :
         $text = "User or Password invalid";
         Break;
      case 2005 :
         $text = "Host not exists";
         Break;
      case 1049 :
         $text = "Database not exists";
         Break;
   }
   result = $text;
}


Thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to