Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6122267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:52:44+00:00 2026-05-23T15:52:44+00:00

Everything I’ve read so far about PDO (PHP Data Objects) is almost too good

  • 0

Everything I’ve read so far about PDO (PHP Data Objects) is almost too good to be true.

I mean:

  • Its faster then mysql or mysqli.
  • It has the same syntax for multiple database drivers.
  • with prepared statements it is secure for SQL injection.
  • you can fetch data directly into a object.

But what are the disadvantages of PDO?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:52:44+00:00Added an answer on May 23, 2026 at 3:52 pm

    Everything I’ve read so far about PDO (PHP Data Objects) is almost too good to be true.

    I use PDO every day, and that’s for a reason. I did write a wrapper over it though, because the default PDO instance does things I don’t like (e.g. fail silently), and the API could’ve been a whole lot better. Configuration with constants is just not my default approach. Also, I’ve created some convenience methods.

    Its faster then mysql or mysqli.

    Is it? I don’t know where you picked this up, and it might well be true, but I haven’t heard of PDO being faster than the native MySQL libraries.

    It has the same syntax for multiple database drivers.

    Sort of. I use PostgreSQL a lot, and the code is different from when you’re working with MySQL. This makes sense though, as PostgreSQL works with named sequences, while MySQL works with “auto increment”, which is a sequence per table. There are differences between databases that PDO can not abstract, even if it’s just for database access.

    with prepared statements it is secure for sql injection.

    You can prepare statements with mysqli too, so I don’t see this as a definitive upside. I do generally use prepared statements though, and I like the :field syntax PDO provides.

    But where are the disadvantages of PDO, something that has so many pros must also have a contra.

    The API is less than intuitive for me, I think the API of mysqli makes more sense. Nevertheless, if you write a wrapper for it yourself, it’s a very decent library. Here’s the wrapper I wrote to make using PDO a little bit more sane, there are many more examples drifting on the internet though.

    EDIT: Oh, and James Anderson is right; it has poor Oracle support. I don’t use Oracle, so I don’t see that as a huge downside though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Everything I read about better PHP coding practices keeps saying don't use require_once because
Everything i've read about objective-c memory management makes it sound incredible easy. To paraphrase
Everything I have read so far, it seems as though you copy the DB
Everything I read online talks about Info.plist. XCode made me a [name of the
Everything I read about cookies says that setting the expiry time of a cookie
Everything I've seen so far is about removing duplicate entries in a database automatically.
Everything I read about Hibernate states that you must roll back a transaction and
Everything I have read says that when making a managed stored procedure, to right
Everything is an object was one of the first things I learned about Ruby,
Everything about this website affirms my decision to develop interactive websites with javascript and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.