Commit

d6cbe68

Contrary opinion: it isn't, unless you're using simple tables of simple data. Then absolutely use PDO. But once you extend into geographic queries or JSON style structured data queries, you are locking into a flavor of SQL anyway, and are tying your code to a database. If that…
As a follow up, I developed that opinion after migrating some start-of-Covid panic-coded things from MySQL to Postgres. Enough stuff broke that I sort of wish I had just used something that forced me to rewrite every line of SQL. On the other hand, some other trivial sites like a diet tracker seamlessly switched over. These were personal sites, for myself or for board gamers and roleplayers, and were designed to provide continuity of community when we went remote in 2020. Afterwards, when I had time, I reworked them. Of course, if you're using a ORM or some other higher level database interface, it is moot. That's why it really impacted the panic-coded and personal quickie things: I just raw coded SQL and got it working quickly. I'm still, in 2026, sitting on a list of them that it "would be nice" to move to my in-house framework that is database blind. (Heck, two of them use Google Sheets as their data store. Those were more of "let's see how this works").

commit d6cbe68

I'm a recent dev, just before the AI craze and I'm thinking of trying out Postgres (PDO). Parts of it's query lang messes with my MySQL brain so I built a query builder to abstract the raw SQL part out.