Skip to content
Tags

,

PDO Oddness

11 Jan 2010

There are some parts of PDO that I find strange.

First up, why is the default fetch mode for the fetch function PDO::FETCH_BOTH? Returning twice as much data seems like a waste.

Second, but related to the first, why can’t you change the default fetch mode using PDO::setAttribute? It’s fine to be able to override the default when calling fetch, but being able to set a more reasonable default seems like an obvious feature.

And finally, why doesn’t the PDO DSN include the username and password? The format for the DSN is a bit different too. Instead of using the URL style, used by many others like the PEAR::DB DSN, they came up with something else entirely.

Related posts:

  1. Finding PHP Short Tags
  2. PHP Helpers: curl_http_request
  3. Will Norris On Authentication In WordPress 2.8
  4. ImageMagick convert – PDF to JPG, Partial Image Size Problem

From → Posts

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS