The error seams to come from another source, not your query. You don’t use wp_options table. So maybe skipping
$wpdb->show_errors();
$wpdb->print_error();
would make things even work. But probably there is an error somewhere else.
To get an overview how to create AJAX search helper, you can check here:
http://www.wpcodelab.com/archives/create-a-custom-ajax-search-for-wordpress
Related Posts:
- What’s the preferred method of writing AJAX-enabled plugins?
- Creating two database tables via plugin
- Query Posts by Custom Field ‘Price’
- How to pass JavaScript variable to PHP in wordpress widget?
- AJAX Call Via Vanilla JavaScript In WordPress Plugin Development
- How to get posts by content?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Execute a function using ajax
- Errors while using ajax from external wordpress page
- Built in admin ajax hooks?
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Why is my ajax call refreshing the page?
- Admin-ajax.php is dying “0” without processing function
- how to use ajax to display from database and load more in wordpress plugin
- How to remove an Ajax action
- How to create popup same as wordpress popup feature
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- How can I reuse the WordPress search form for a custom plugin / widget?
- $wpdb working with ajax but showing ajax error instead of success
- How use %like% in sql statement wordpress
- Ajax gives 400 error
- Accessing GET variable named ‘error’
- Check if email address exists front end with AJAX in a plugin
- WP_Query ordering numbers as letters
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- What is the best way to mimic a search query within a plugin
- WooCommerce get_price returning wrong price when used via ajax
- Simple ajax call not working in wordpress plugin
- switched from query_posts to WP_query, not working now?
- __callStatic method handler passed to add_action causes bug in PHP
- Using a custom plugin to capture input data via Ajax and PHP
- Ajax contact form widget plugin data not insert in database
- Search for categories
- Best place for if/else piece of code related to custom plugin?
- Ajax call returning 0
- how to use in custom single.php template using php?
- Create tabs in admin options page from custom post type loop
- How to create a custom shortcode based on the layout?
- Using AJAX to generate front end / viewer end pages
- AJAX search as you type? [duplicate]
- WooCommerce search products between price range using WP_Query
- What are the Best Practises When Using AJAX in Plugin Development?
- Redirect to another page using contact form 7? [closed]
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Submit Form data to another page via Ajax (WordPress Way)
- WordPress front end AJAX. Return 0 :?
- Using WordPress to build membership Page
- woocommerce search by sku and title ajax
- Asynchronous request in wordpress
- Is there a better way of handling AJAX requests in WordPress?
- How to get CPT category checkbox list and show post of selected(multiply) checkboxes via ajax?
- WordPress API functions not working at AJAX functions.php call
- Calling a class method instantiated by ajax call in wordpress [closed]
- Delete data from custom table when deleting a post
- Ajax request sends url rather than data
- best way to run a php script away from the template?
- can’t unzip file
- How to search post titles with whole words only, but not the exact word only?
- wp_query ‘s’ parameter does not work with WC_AJAX
- wc_get_template_part doesnt display the content [duplicate]
- How to add the search page link to the anchor tag?
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- Error datatable whit ajax
- adding dynamic/multiple slug values in ‘option_none_value’
- How to use Datatable with Ajax when creating plugin on WordPress?
- Performance considerations – postmeta table versus new table for custom posts with foreign keys?
- AJAX update fails for public/non-admin users
- Checkbox field that add a subscription product and change prices of other products in checkout and cart page
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- How to use information from the database in the front-end?
- ajax voting for custom post type
- User Following System
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- My ajax request don´t work and return 0
- WordPress environment not loading properly
- wordpress ajax pagination object value does not change
- History of page, interval of years
- How to insert variable which contain array value in wp_options table?
- How can I use wp_ajax_response for front-end error reporting?
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- WordPress ajax not working in registration
- Shortcode in a blog post, footer and related products stop working
- What’s the preferred method of writing AJAX-enabled plugins?
- Ajax, jQuery and WordPress
- How to get site homepage from plugin?
- WP-Snap too slow (caused by WP_Query?)
- WordPress Meta Query: Relation is not working correctly
- Capturing POST data
- Making a Custom Post Type Publish Loop
- Checking url from plugin [duplicate]
- Help me with my first very basic plugin
- Load css classes after using ajax calls
- wordpress Ajax success doesn’t return the value
- Jquery post responses 500 error after some time and lastly an 503 error
- Inline AJAX script passing variables to PHP
- Can we install 3d product configurator into wordpress
- wordpress admin-ajax bad request 400
- Accessing Correct Database to Create REST API Endpoint