$wpdb is outside the scope of your plugin file, you need global $wpdb; before using $wpdb->prefix
Related Posts:
- Multiple instance of data in plugin custom database table on plugin activation
- Create custom column in post table in wordpress
- Should I global $wpdb outside of any of my plugin’s functions scope?
- WordPress register_activation_hook table creation not working
- Default Plugin Settings Not Writing to Database
- DROP TABLE with uninstall hook not working
- How to check if tables in WordPress still exists after activations
- Create a table with wordpress plugin boilerplate
- Why this function not working for install database on plugin activation
- How to create multiple database tables on plugin activation?
- Can I create a table on my DB without creating a plugin?
- Creating a search form and displaying results
- create pages automatically and dynamically in wordPress
- $wpdb->delete not working for me
- I want to schedule email (date, time is in database->table) wp_schedule_event() not working
- Need help for creating custom table on wordpress
- Show a table from data submitted by a form from a user
- Uninstall, Activate, Deactivate a plugin: typical features & how-to
- How to delete all records from or empty a custom database table?
- How to make sense of the active_plugins option_value to enable and disable certain plugins from the database?
- Show a confirm message before plug-in activation
- Using Vagrant for customizable WordPress Multi-sites [closed]
- Updating WordPress – the best approach (updating wp core, plugins and db)
- Function to activate WordPress theme inside a plugin
- How can a Firebase user registration and login be integrated into a WordPress site?
- Bad Request (Invalid Hostname) on working server, database problem
- Plugin Not Working, But Only On GoDaddy Hosted site
- explanation for activate_plugin function in wordpress core
- Ajax with jQuery UI dialog not working
- wordpress in nginx docker container connected to php:8-fpm container and mariadb container isn’t creating any tables on plugin activation
- Is the wordpress user-model changed in wpmu?
- Creating Tables on Network Activation
- Where to hook my plugin’s action
- How to activate plugins for my WordPress sites from a remote server
- Building an email signup form. Where should the information be saved in the DB?
- Retrieving a Value from a wp-database
- Delete query not working in plugin
- How do I network enable a plugin for a multisite install via the database?
- WordPress and a secondary database?
- Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?
- WordPress : Explain Plugins & Theme string value in database
- Run function on plugin activation before plugin is loaded
- Plugins in WP_Options but not Active
- WordPress as a data-store?
- Issue running db create table query from static method
- Problem of encoding characters (apostrophes) in my posts publications
- Is there a rule for wordpress plugins developers to not do any database changes upon update?
- A question about register_activation hook
- Updating options into the wp database performance
- Ajax save data to database on document ready, no data being saved
- register_activation_hook() not working as expected
- External wpdb connections in different plugins on single page
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- WordPress plugin boilerplate table create
- Table is not created in WAMP
- How to relate 3 wordpress components with each other (Create database relationships)
- Apparent errer when installing plugin
- How can I store data from custom fields to custom tables?
- Interface needed to transfer contents in a table on a web page to the Add New Product interface
- Integrating Custom Database with WordPress
- How to display results from a data table with an encrypted user id?
- add_action for publish_post doesn’t work
- Getting URL GET parameter with Code snippets and storing it in database?
- Activation flow of a plugin in a multisite environment
- Same Plugin tables between wordpress installations
- Is classical wordpress eidtor a good option for me to include a large table with a large number of images on my webpage?
- A dynamic table plugin to get user input
- Optimise wordpress database using SQL after deleting registered images from Media Folder
- How to implement data residency in my WordPress site
- how to enable/activate a plugin per Cpanel
- WordPress database problem wp_posts, primary key
- My WordPress activation hook isn’t working
- How to allow URL with filename & extension in wordpress?
- How wordpress handle urls present in db for external wp-content directory
- Using Filters to modify contect – DB query results alwats appear fist
- Cannot modify header information – headers already sent during plugin activation
- PHP message: WordPress database error Deadlock found when trying to get lock
- Many to many relationship for variable products
- Is it a good practice to use wordpress database to store pages contents which loading to page dynamically?
- using wordpress login details for other website / application / forum?
- Where do the section input fields values are stored in database
- how to create database to use it in wordpress website?
- How to create a custom page for unrelated database?
- User content database [closed]
- Error Copying Directory On Plugin Activation
- A plugin is giving me “You do not have sufficient permissions to access this page.” error
- Problems with installing and deleting plugins
- How to find an option in the database?
- Carrying information from button click into form [closed]
- wpdb get_var is not returning any result (verified mysql query returns only one value)
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Get the url of attachments from the post?
- Create New Admin Menu Section – Like how custom post type works, in a way
- Shortcode returning specific content of a post
- get_option returning a different value from what’s saved
- Identifying Plugins Based on Tables [closed]
- How can I delete the options from DB when the plugin is deleted?
- Edit a page/post DB data?
- How do I set WordPress to send 2 different emails based on criteria in the database when someone submits a form?
- Automatically install bundled plugins during theme activation?