Hello all,

I am quite new to php and especially MDB2 package. Despite some thorough research I could not find an answer yet. When I try to connect to a database using MDB2::connect method, and the database server is not running, I only get an error code of -1 and a message saying "MDB2 Error: unknown error". Looking at MDB2 source it rather should say "connect failed" with a code of -24 (MDB2_ERROR_CONNECT_FAILED). Is my expectation wrong, or how can I get some meaningful message and error code in this situation?

The code I use is:

$dsn = "mysqli://mysql:my...@"; // This works when mysql server is running
$con = & MDB2::connect($dsn);


Any hint is warmly appreciated!



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

Reply via email to