$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
- How do I show data from gravity forms in my template? [closed]
- How to Add an Index to Plugin Database table
- How can I delete orphan keys in WordPress database tables?
- Creating two database tables via plugin
- Pluggable function and activation check?
- How to make sense of the active_plugins option_value to enable and disable certain plugins from the database?
- Insert query inserts 2 entries, should insert 1
- Updating WordPress – the best approach (updating wp core, plugins and db)
- Function to activate WordPress theme inside a plugin
- How to store ACF custom fields data in a custom table
- Bad Request (Invalid Hostname) on working server, database problem
- Plugin Not Working, But Only On GoDaddy Hosted site
- WordPress plugin DB upgrade
- Force plugin to fail activation
- Correct way to use register_activation_hook
- How to edit/delete single row items in a table on my own menu page
- wordpress in nginx docker container connected to php:8-fpm container and mariadb container isn’t creating any tables on plugin activation
- How to include plugin without activation?
- Plugin Deactivate Self on Activation Errors
- How to determine what is generating large amount of database queries?
- Retrieving a Value from a wp-database
- Need help restoring my WordPress blog
- WP plugins for building a database?
- Plugin Options Not Saving to Database in WP 4.5
- Doubt using $wpbd->get_col for a single column
- Is it possible to create Custom Post plug-in?
- WordPress Settings Lost After Site Migration
- Delete query not working in plugin
- WordPress plugin output formatting
- How do I network enable a plugin for a multisite install via the database?
- import posts with dutch/special letters
- How can I change the meta_key for a particular piece of information?
- Better ads plugin has 500.000 entries in wp_postmeta
- register_activation_hook in oop approach
- Creating a CSV with PHP inside the plugin directory
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- How to create plugin/ page that reads from database
- DB Query not working in Plugin
- Assign all Post in Wp to a specific Category
- Sub Plugin deactivation when Parent Plugin deactivate
- Storing The Data Collected by Ninja Forms into Another (custom) Database [closed]
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Storing Form data in a different database
- Can’t create tables with my plugin
- More than one WordPress site using the same database – how to disable plugin for one site?
- How to make a Product page without ordering and database
- How to get specific column data conditionally in database in WordPress?
- How can I display selected content from a seperate database in an Activity style widget?
- How do I add a medium to the WordPress database with my own plugin?
- Performing CRUD operations on front end in wordpress
- How to add specific script to WordPress webpage that will working with user input and databases
- How to use WordPress header function and footer function and not load word press database
- How to securely controlling data without keeping it in postmeta?
- $wpdb->insert not working inside save_post tag
- How to check for already existing plugin versions on activation? and prevent errors
- Get Shortcode output to database for static post_content
- Store GravityForm data in phpmyadmin (mysql)
- Accessing data from Google Cloud Datastore in WordPress site
- errno: 150 “Foreign key constraint is incorrectly formed” [closed]
- Database error when user logs in
- database – multiple wordpress installations using same database – can they share plugin settings?
- HyperDB failover Delay
- WordPress hook source
- Create user assessment and use results in sql query
- WordPress custom posttype meta values doesnot save
- get_var result empty for query of custom table in plugin admin
- Posts are deleted everyday at night
- Display Plugin information on specific url
- Insert data in custom table during new post creation
- Simple Data Table Update and Page Integration
- Custom Table doesn’t create on plugin activation
- Activate plugins by a theme’s functions.php?
- Is it possible to send user new password after they clicking on forgot password in word press
- Is it safe to increase/alter the size of the wp_post.guid column from VARCHAR(255) to VARCHAR(2048)?
- Duplicator live to wamp https to http
- why i cannot see some plugins while they are enabled on network admin page?
- Website keeps going down, is it a plugin, database, memory problem, or something else?
- On the same site, how do I send data from a plugin file to a theme file?
- Share or sync user table data with another user table
- Very slow page loads
- Form with response button after on table after submission
- Can’t save formdata in DB
- How to set an exact search box in tablepress plug-in