Re: [PHP-DB] PDO Exceptions

2013-04-25 Thread Niel Archer
 Greetings,
 
 I am new to this list. I have a question about which functions need to be 
 included in a try block. 
 
 Of new PDO, prepare, bindParam, execute, fetch, and query, it 
 seems that bindParam is the only one that throws an exception. So is this the 
 only that needs to be put into a try block?
 
 Thanks,
 
 -KJW
 Proverbs 3:5-6

Are you aware that there is a setting to control whether PDO objects throw
exceptions, warnings, or nothing? By default it does nothing except set
the error code and message.

See http://uk3.php.net/manual/en/pdo.error-handling.php

--
Niel Archer
niel.archer (at) blueyonder.co.uk


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



Re: [PHP-DB] PDO Exceptions

2013-04-25 Thread Jim Giner

On 4/25/2013 6:49 AM, Niel Archer wrote:

Greetings,

I am new to this list. I have a question about which functions need to be 
included in a try block.

Of new PDO, prepare, bindParam, execute, fetch, and query, it seems 
that bindParam is the only one that throws an exception. So is this the only that needs to be put into a try block?

Thanks,

-KJW
Proverbs 3:5-6


Are you aware that there is a setting to control whether PDO objects throw
exceptions, warnings, or nothing? By default it does nothing except set
the error code and message.

See http://uk3.php.net/manual/en/pdo.error-handling.php

--
Niel Archer
niel.archer (at) blueyonder.co.uk


And I learn something new today too!

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



[PHP-DB] PDO Exceptions

2013-04-22 Thread Onatawahtaw
Greetings,

I am new to this list. I have a question about which functions need to be 
included in a try block. 

Of new PDO, prepare, bindParam, execute, fetch, and query, it seems 
that bindParam is the only one that throws an exception. So is this the only 
that needs to be put into a try block?

Thanks,

-KJW
Proverbs 3:5-6