You could insert a
$wpdb->show_errors();
to output the errors in your query.
Also you need to input that sql into
dbDelta($sql)
did you miss that?
Related Posts:
- How to make WordPress plugin check for database changes and then do something?
- Database “Migration” for Plugins?
- Plugin Modification Change Functionality For Logged User Only
- error_log() output for print_r() appearing on page
- Custom plugin: Trying to show saved data on frontend
- Fatal error: Call to undefined function plugin_dir_path()
- How to display multiple Post meta_key/meta_values by SQL query
- Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
- How to use copy() function and paste file in /wp-content/themes directory
- OOP Plugin Development. Including external object
- Authenticating to WordPress, using my own authentication two-factor system
- Use composer to load custom classes [closed]
- wordpress custom endpoint multiple params
- WPDB: how to get the value of a field in a custom database table
- Create table in database when activating plugin
- allow user to select pages from dropdown in my plugin
- Am I not understanding plugins?
- How to set a custom path, for ajax image upload folder in admin?
- Page Reloads Before AJAX Request Finishes
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Insert array data on plugin activation
- Adding Default Settings to Theme My Login plugin
- how to delete 30 day old data using PHP [closed]
- Create onClick Event to Re-load a Widget
- Accessing the database from a plugin outside of action hooks
- Adding subdomain to home_url for “add_menu_page”
- Hide categories that are not used in the post type
- Automated Cart Update With Alert Box Each Time
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- How to sanitize any integer input field in wordpress?
- WordPress ajax doesn’t display object method on jQuery .change() function
- filter default query to show just selected level of child pages in wordpress
- Querying wpdb using PHP
- How to make my custom widget appear within WordPress widgets? Plugin development
- Adding widgets to my plugin page instead of WordPress dashboard
- How to insert data into database using wp cron job
- Archive post by meta value + 24hours
- Access Child Class of Plugin Main Class Instance
- Genesis framework comments broken?
- Font Awesome changing default WordPress Font
- Download full html page with CSV export plugin
- How to hook code to show after the_content?
- Is it best to avoid using $wpdb for security issues?
- Usage of call back function of add_meta_box()
- how to save checkbox data for custom setting?
- Correct PHP to output a single result of a Function with SQL Query
- How to Schedule Cronjobs for start of every month and year
- WordPress WP_Query without query GET parameters
- Where to copy woocommerce files to in my custom theme to avoid editing the core plugin?
- Woocommerce custom Plugin in wordpress [closed]
- Removed jQuery script from header.php , any problems?
- How can I get plugin meta data without knowing the plugin folder?
- calling admin-ajax.php from admin-ajax.php
- Fetching review value using wpdb class
- Flatten Responses returned via WP REST API via WP_Error for obfuscation
- How does add_option() function enable action hooks to fire right after actiavtion?
- Create plugin with custom page and template caused an error `Call to undefined function get_header()`
- Settings API form – submit with AJAX
- Post form – AJAX won’t upload featured image – Plugin development
- Run a sql (update) after 12 hours after the user login. Woocommerce users
- WP Hook Before a post is created
- Submit remote form to wordpress REST API and save data to custom post type
- Foreach Loop Of Post Types With Nested If Else If Not Completing Process
- In a foreach loop, how can I add a meta value if it doesn’t exist?
- Looping through and combining calls to Woocommerce REST API
- Should I use wp_cache in my plugin to make it faster?
- How to import woocommerce custom fields data into another site?
- Add a custom link to each image in WordPress gallery
- Problem with my Login Plugin
- How to access this jQuery/AJAX data in a PHP file/WordPress plugin
- post_exists stops working in a scheduled event
- register dependency css and js inside a plugin class
- When I create a new custom post type, it replaces the old post type
- Collect all events in one year
- Help on Wp_query to print an term
- Inserting other fields to existing registration form in a WordPress theme
- Add .php to end of all WordPress Pages (multisite)
- user update profile for custom code
- Upload images from one server to an other in wordpress
- PHP get_category() function redeclared
- Front end/Database connection in WP
- Getting Member Data From WhishList Member on Register
- I’m writing my first plugin and my echo output is showing up on every page of my wordpress installation
- global $post inside plugin query messes up every new post page in wp-admin
- wp_query (or hook) posts by date (id) in array then set post_type
- Chosen Select jquery Not Working in Plugin
- PHP calling function within a class
- How to use Amazon Elastic Transcoder from WordPress using AWS SDK for PHP?
- Sum of Custom Meta written by Authour
- Save data of select list after clicking save
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- How to get WordPress Adminmenu items?
- I’m not able to get access $wpdb in my php file in wordpress
- How do I change the Go To Categories link in the term_updated_messages
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- Custom taxonomy with page post type – WordPress
- Query posts by custom taxonomy slug in WP REST API?
- oneOf JSON Schema validation not properly working for custom post meta value?
- Too few arguments at registering new templates in my plugin
- I want to lists posts in wordpress to nearest location entered by the user