News for hackers. Stuff that matters.
Re:The Last PHP PDO Library You Will Ever Need by ralmeida on Friday November 04, 2011 @08:31AM (#3195774)
I would just add a fetch_scalar() function. It makes some common operations get very readable:

$total_users = $db->fetch_scalar("SELECT COUNT(*) FROM users");

Re:The Last PHP PDO Library You Will Ever Need by leftnode on Friday November 04, 2011 @09:04AM (#3195865)
fetch_column() does essentially that. You can pass in the column number you want fetched, in this case, it would be the 0th column.
Re:The Last PHP PDO Library You Will Ever Need by ralmeida on Friday November 04, 2011 @09:11AM (#3195893)
I know. I would at least add it as an alias to $fetch_column(0), out of sheer readability preciosism =D