40 ms·
Wordpress isn't database agnostic by default? That seems strange to me!
by madeofpalk 4y ago
Wordpress isn't database agnostic by default? That seems strange to me!
- deleted 4y ago[deleted]
- anonydsfsfs 4y agoWordpress was first released in 2003. There wasn't a database abstraction layer for PHP at the time (PDO was first released in 2005), so it was tightly coupled to MySQL.
- 0x0 4y agoAnd PDO isn't even a proper database abstraction layer, it's just a way to connect to various databases and issue prepared statements. You still have to write your own SQL queries and create table statements, which will most certainly not be portable.
- madeofpalk 4y agoFair. It's 2022 now. I figured in the 19 years since they would have done something like this.
- ceejayoz 4y agoThey’ve consistently prioritized backwards compatibility over pretty much anything else.
- tyingq 4y agoIt doesn't even use placeholders and prepared statements. What looks like prepared statements, for example, are not. Behold: https://github.com/WordPress/WordPress/blob/master/wp-includes/wp-db.php#L1395 https://github.com/WordPress/WordPress/blob/master/wp-includ...
- mickael-kerjean 4y agoThis is wild and hard to believe nobody has found a way to do some sql injection from there