[nycphp-talk] Trying to decide between MDB2 and PHP PDO
John Campbell
jcampbell1 at gmail.com
Thu Jun 25 18:04:03 EDT 2009
On Thu, Jun 25, 2009 at 5:44 PM, Eddie Drapkin<oorza2k5 at gmail.com> wrote:
> Wait, are you advocating //against// prepared statements?
Not at all, but when using mysql, you should emulate them. I am
actually all for "prepared" style queries, if I ever see
"mysqli_real_escape_string" in someone's code, I immediately write the
person off as clueless.
> And why the hate for PDO?
I don't see what it offers. It is too verbose for my taste:
I like to be able to write:
$posts = $db->sql("SELECT * FROM posts LIMIT ?,?",$offset,$length)->fetchAll();
To achieve this, I have to wrap whatever I am using, and I have found
PDO to be slower and more buggy than mysqli.
Regards,
John Campbell
More information about the talk
mailing list