views:

29

answers:

2

Doesn't seem that failure mode for that function is documented anywhere I've been able to find....

+1  A: 

you can easily find it out yourself, do a call on that function with a statement which wont find a value, then just do

var_dump($myReturnValue);

and it will print the value including the return type :)

zolex
Doh! Looks like it returns false on failure -- makes sense I guess because most (all?) RDBMSs don't have a boolean type (one uses TINYINTs or ENUMs instead).
Billy ONeal
A: 

Although the Zend Abstract class states it returns an array, the PDO returns false on failure. Therefore the return is mixed: array or false

Ashley
Why would `fetchOne` return an array?
Billy ONeal
Sorry, string not array. My mistake
Ashley