Turns out that WordPress is using the ezSQL library as its wpdb core. Does anyone know this library? Is it safe to include it in my project? It hasn't been updated for over a year.
@JackJohansson I think you can, and not being updated is actually a good thing IMO. Anyway IMHO this is an example to why I fail to understand people that made their own systems from zero. Sure we (especially me) like to rant against wordpress, but in the end of the day if you use wordpress you do not have to bother yourself with this kind of questions.
I am sure PDO is more secure than direct mysql calls. You use prepared statements in about the same way wordpress does "prepare".
Wordpress can not use PDO for that because prepared statements will not work well with filtering SQL statements
... using filters on....
anyway, this goes back to our previous discussion, it seems like you focus on details instead of big picture ;). Once you have your own low level primitives, selecting a DB "driver" is just a technicality, some thing you can change your mind about at any time
or to say it differently, you first need to define yous own DB driver that implements your need. After that you can decide if it is better to use PDO/mysqli directly or you need a middleman
most important thing is probably to get a client to commit to what he asks for, so when he changes his mind it will not come as a surprise that the delivery time and cost will change as well
@TomJNowell I guess it's worth learning PDO for me. Decided to give it a go, seems like I only need a few wrapper functions instead of writing a whole lot of code to reproduce $wpdb
I'm building an app with the usual layers like presentation, application, infrastructure. Right now, I have been using Wordpress functions in both my controllers and repositories. I figured that controllers need to be re-written anyways should the framework change, and repositories are part of an...