Re: PDO Exception Handling Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Read on otn :

"PDO_ERRMODE_SILENT
This is the default mode; it will simply set the error code for you to inspect using the errorCode() and errorInfo() methods of both the statement and database handle objects.

if (!$dbh->exec($sql)) {
	echo $dbh->errorCode() . "<br>";
	$info = $dbh->errorInfo();
	// $info[0] == $dbh->errorCode() unified error code
	// $info[1] is the driver specific error code
	// $info[2] is the driver specific error string"




Cyril PIERRE de GEYER a écrit :
And also my question is :

"Why did the PDO creators (Wez the King?) decide to choose the silent mode for being the default one ?"

Why not defining the ERRMODE_WARNING by default ?

Or perhaps I misunderstand something, and I would be very happy to learn a bit :)

Thx

Cyril

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux