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

Popular posts from this blog

mysqli - Php Mysqli_fetch_assoc Error : "Warning: Illegal string offset 'name' in" -

html - Cut text on left side inside button while centering -

php - Hide Categories from WordPress Dashboard by ID and Custom Post Type -