That was not exactly change in code, that was change to better inform people they are not using the method correctly.
In line with wpdb documentation you need to properly pass values, or they won’t be properly escaped in query.
In your case it would turn into something like:
$wpdb->prepare("SELECT id, name FROM %s", $table_name)
Note that if $table_name
isn’t coming from any untrusted input, then there is no need to prepare query in such case altogether.
Related Posts:
- Upgrade 4.5.2 to 4.5.3 deleting row in wp_options table
- Can I upgrade a plugin to a specific version?
- Plugin upgrading: Widget settings
- How to delete all records from or empty a custom database table?
- dbDelta only creates the last table
- How to customize a plugin whilst maintaining ability to upgrade
- How to avoid plugin name conflicts from the upgrade notifier?
- How to check plugin compatibility before upgrading WordPress
- Is their any way to Extend WPDB class and Overwrite the Default Query Function
- A Way to Auto update plugins using cron?
- Updating WordPress – the best approach (updating wp core, plugins and db)
- Stackoverflow type of badge plugin giving warnings in WordPress 3.5
- Hook (upgrader_process_complete) running moment
- WordPress plugin DB upgrade
- ob_end_flush error when using wpdb in plugin
- $wpdb->get_results() does not fetch results with unicode ‘WHERE’ clause
- post_content getting cut off on blank space on $wpdb->update
- Why users disable the WordPress update?
- Upgrading WordPress 4.0 asks for FTP password
- I can’t upload a new wordpress theme from a zipped file
- What is the easiest way to implement cascading database upgrade for my plugin?
- Upgrade Private Plugin without Deleting
- Hook before & after plugin / core update
- Why am i getting this error? WordPress database error: [Query was empty]
- WordPress 5 upgrade: until when is it safe to keep project running in 4.x?
- Inserting large amounts of data into a custom table during plugin install
- How to review WordPress website php version compatibility?
- plugin ajax to external php file always return null
- When to call add_filter
- Best method to upgrade multisite plugin’s numerous database table
- Doubt using $wpbd->get_col for a single column
- Access WordPress database outside of WordPress
- Correct way to perform non-cacheable DB query
- WordPress independent plugin upgrade notification system [duplicate]
- Help With MySQL to WPDB Query Conversion
- WSOD after upgrading to 3.1
- Upgraded to latest version – 3.0.3 and Now I get a “sufficient permissions to access this page” error
- Creating mySQL procedure with $wpdb
- Problem with creating tables for Plugin
- Change commission_status paid when withdraw_status vendor is completed
- How to find wordpress db schema changes when upgrading from 4.9 to 5.2
- Enabling WP_USE_EXT_MYSQL to support old plugin
- $wpdb->get_row returns column name instead of column value
- Create a table with wordpress plugin boilerplate
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- file-gallery plugin line 1573 broken in 4.2 upgrade [closed]
- Object method calling for global $wpdb in header.php
- Does WP delete deprecated plugin/theme files on plugin/theme upgrade?
- Using wpdb without loading all plug-ins via wp-load.php
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- How to insert multiple postmeta values with one query?
- WordPress crashes with “The service is unavailable.” after trying to upgrade plugins
- Disable a plugin from ever upgrading?
- Cannot get wpdb data (Error in a simple fuction) [closed]
- WPDB: Update table
- Issue running db create table query from static method
- can we modify wordpress plugin version value to avoid update warning?
- $wpdb update query in plugin only updating one column
- Maintaining plugin addons while upgrading
- wordpress upgrade from 4.2.1 to 4.7.3 500 error
- Mowing site to another domain in simplest way
- Plugin upgrade failing during unzip
- Store plugin page content in wp_options?
- Displaying data from another database
- How to check for completeness when upgrading fails and stuck in maintenance mode
- Using $wpdb in a plugin, what sort of data does it return?
- How to access the WordPress DB from a plugin file
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- My plugin does not install correctly if a previous version is still installed
- Linked pages from plugin on front can’t see $wpdb
- Hooks to run after a core upgrade?
- Need help creating asynchronous data scraper in WordPress
- ob_end_flush(): failed to send buffer of zlib output compression (0) in external php
- How to fetch WordPress database values in JavaScript widget
- $wpdb->delete not working for me
- any word search WordPress
- How to securely controlling data without keeping it in postmeta?
- WordPress wp get_temp_dir return non exiting folder, thus failing plugin & themes update
- Using id to show item
- No result after wpdb->insert
- How to fix slow comment query?
- Write mysql credentials in plugin
- What is a good way to test that plugin upgrades have completed properly?
- Action hook “wp_insert_post” works but not for last imported post
- installed WordPress but can’t upgrade or add plugins due to webdav https?
- Proper way to trigger a MySQL query via link in a plugin
- get_var result empty for query of custom table in plugin admin
- Making plugin to use different table prefix cause permission problem
- Can’t upgrade themes or plugins after upgrading WordPress to 4.4
- Is it safe to increase/alter the size of the wp_post.guid column from VARCHAR(255) to VARCHAR(2048)?
- Get all the related data from WordPress DB
- $wpdb selects wrong database
- How to dispaly post informations (such as titles) in an admin plugin menu page?
- FATAL ERROR: WP complains about redeclaration [closed]
- How to check record is exist or not in WordPress CRUD Operation with $wpdb
- wp db request without refreshing the page
- How prevent STDOUT of Plugin_Upgrader->upgrade(…)?
- How to create a dynamically created page on wordpress plugin?
- update_option_{$option} not showing old value
- How to allow Contributors to publish articles after approval