You don’t need PDO to write safe DB queries. PHP developers were able to do so before PDO was created 😉
There is nothing unsafe in using WPDB
class, as long as you do it correctly (just use prepare and correct ways of escaping).
There is one major flaw in your question: using PDO, of course, doesn’t make you secure – you still can write unsafe code 😉 That’s why you can find SQL Injection vulnerabilities also in software that uses PDO (or even ORMs).
So I don’t see any reason for arguing why WP doesn’t use PDO. Much better (and more up to date) would be a question: “Why is there no ORM impelementation in WP” 😉
Related Posts:
- Inserting Post Meta From SQL
- How to execute mulitple statement SQL queries using $wpdb->query?
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Query WordPress database by registered date and role
- Size article thumbnails and retrieve them directly from database
- wpdb_prepare with multiple or condition
- SQL Error wp_commentmeta – incorrect table definition
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- How do I get the posts within a certain year/date(with sql query)?
- Create table from array with prepare
- Why this query is not showing any result on wordpresss home page?
- Why does changing Database Table Prefixes result in loss of content?
- SQL query to set posts in bulk based on the post content
- $wpdb->get_var – What value is returned when zero records are found?
- DB prefix not updating
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- How to create index (sql) to a meta_key?
- Delete all users meta that named: user_avatar
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- export individual posts to text files or a single csv file
- SQL query : Select a thumbnail for a media
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Case statement in MySQL
- Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
- Oracle SQL query for Date format
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- Error: Duplicate entry ‘0’ for key ‘PRIMARY’
- Using wpdb to connect to a separate database
- WPDB Insert or if exists Update
- The MySQL alternatives: Do Percona Server and MariaDB work well with WordPress, and do they make WordPress go better?
- wpdb->insert multiple record at once
- How to define composite keys with dbDelta()
- WordPress for a very large website
- WooCommerce with thousands of products – site is very slow – optimize db queries? [closed]
- How to Join two tables from separate databases within WordPress
- Change SQL get_results to search for posts with custom term in custom taxonomy
- Error establishing a database connection – with Debug Data
- wpdb query on custom table not working [closed]
- Database with mixed collation (utf8mb4 & utf8_general_ci)
- Using table lock with wp_insert_post?
- Set Display Name to first and last name (phpmyadmin SQL Query)
- Is it safe to convert tables from MyISAM to InnoDB?
- Migrating database / content of non-CMS site to WordPress
- Does WordPress ever need multiple databases?
- Why are no posts showing despite my apparently correct DB restoration?
- How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?
- Delete all post meta except featured image Using SQL
- How do I properly update the WordPress database password?
- Adding new row to wp_post table
- How do I find which articles are missing a featured image in The WordPress database?
- WordPress Install and Database on separate hosting?
- WordPress database error – Error in SQL syntax – I can’t identify any error?
- Database Tables Lost Indexes? How to Recover?
- Setup private content for specific users with daily updates [closed]
- Migration: Copying database content to a different server
- Call to undefined function get_user_meta() – trying to access data in MySQL from custom fields
- Which data is written and stored in the database when read-only (non-posting, non-commenting) users visit the site?
- Duplicated site isn’t recognized as a site
- Query multiple tables at once?
- Have working sql query… trying to adjust it to use $wpdb
- Changing root password in PHPMyAdmin for WordPress Database when going live
- creating new field on mysql
- Remove empty rows from the database
- Custom WordPress Table wpdb
- how to encyrpt DB_PASSWORD in wp-config
- How can I detect right db type?
- Delete all posts that do NOT have a specific tag
- Changing order of db results when encoding to JSON
- Second ezSQL initialization for MSSQL
- Fetch a single row from a custom table for to a given ID
- Database create or redirect
- How to escape percentage sign(%) in sql query with $wpdb->prepare?
- Link multiple user databases together?
- Sql query to get all metadata for a post
- Recovery – Restore Database after moving folder location locally
- Performing CRUD operations on front end in wordpress
- Set a cron job to delete a specific database table table every midnight
- Job and Employee Performance Tracking with Product Safety
- SQL database import #1046 error
- How to import products in host instead of database on wordpress?
- I would like some help wth an SQL query to link posts with categories
- Where is the HTML-handler part in the wpdb class?
- Is there a way for two deferent themes to consume two different DB on a same WP instance?
- next comment id number wordpress
- How can I get $wpdb to show MySQL warnings?
- How to get specific table by current user login
- Merging development site with live site
- WordPress Database Posts Table query
- How to extract some part of WordPress full source code
- Check if a database is well installed
- live site do not update after importing sql database
- MySQL Database User: Which Privileges are needed?
- Import Excel (or csv) Table with user-data as subscribers to wordpress
- Print output of Table Creation
- SQL query to rewrite all media URLs to end with .webp
- Weird WP -Cli Error Connection Refused
- How to find fresh (last modified) and sql backup?
- Uploading to WordPress Database