php - MySQL Return Type Variance - NULL, EMPTY, FALSE -
why mysql -> php
via pdo
either return null
, empty
(array), or false
when select
query (and possibly other types) returns zero-result set?
i can't quite seem figure out in cases each different type returned... , hope not written somewhere on front cover of manual; although did bit.
edit 1:
so seems pdo thing, not mysql. pdo->fetchall() return empty array if result-set zero, , false on error. null
? and no column values requesting not null in case silly thought came head.
in detail important function using.
in generally, "false" means error occured.
check out php.net more details.
Comments
Post a Comment