Database error (More Details)

From: Date: Mon, 08 May 2006 09:35:36 +0000
Subject: Database error (More Details)
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23995@lists.php.net to get a copy of this message
Hi Everybody Though i give wrong details in DSN while connecting to the database I could not catch the error I am new to pear if i have done mistakes in my coding please notify......... 1)Correct DSN require_once 'DB.php'; $dsn = 'mysql://root:@localhost/student'; $db =& DB::connect($dsn); if(PEAR::isError($db)) { die($db->getMessage()); } echo "<br> Database Connected Sucessfully"; Output:Database Connected Sucessfully; 2)Wrong DSN require_once 'DB.php'; $dsn = 'mysql://roooooooooooot:@localhost/student'; (dsn is wrong) $db =& DB::connect($dsn); if(PEAR::isError($db)) { die($db->getMessage()); } echo "<br> Database Connected Sucessfully"; Output:Database Connected Sucessfully; Though i am giving wrong details No error message is displayed why?????? Some more points..... 1)If i give wrong details for phptype (ie for mysql i give myyysql) Error is displayed . 2)If i give wrong hostname also Error is displayed 3)If I give wrong database name also Error is displayed 4)The Thing I could not understand is...... if I give wrong details for username (ie for root i give roooooooooooot ) No error message is displayed THE USER TABLE IN MYSQL contains the following users ----------------------------------------- Host User password ----------------------------------------- localhost root % root localhost % ----------------------------------------- regards moses

« previous php.pear.general (#23995) next »