Replace this:
$result = $wpdb->get_row("SELECT * FROM wp44_predefined_address WHERE 'UPPER(Address1)' LIKE 'UPPER(%s)'", $myinput);
with this: (just choose the appropriate $like
based on your requirements)
// Properly generate the LIKE query.
$like="%" . $wpdb->esc_like( $myinput ) . '%'; // e.g. '%input%'
//$like="%" . $wpdb->esc_like( $myinput ); // e.g. '%input'
//$like = $wpdb->esc_like( $myinput ) . '%'; // e.g. 'input%'
$result = $wpdb->get_row("SELECT * FROM wp44_predefined_address WHERE Address1 LIKE %s", $like);
Related Posts:
- Most efficient way to get custom database records from 20 buttons and 20 tables?
- WordPress shortcode attributes for database SELECT?
- Function stops working
- Ajax call always returns 0
- 400 bad request on admin-ajax.php only using wp_enqueue_scripts action hook
- Use AJAX in shortcode
- wp_get_attachment_image returns different image size
- AJAX handler throws 400 (Bad request) – why?
- ajax live search for post title
- Replacing select2 in admin backend for all selects
- Display random text from a file with the WP built-in AJAX API
- Using email_exists() wp function in an ajax request
- How can I rename the WordPress AJAX URL? [duplicate]
- How to update BuddyPress xprofile fields programmatically? [closed]
- How do I call wp_mail from HTML?
- Unable to get_the_content(); of a post in WordPress via AJAX
- Ajaxing function in widget class
- Search user metadata with checkboxes via ajax (almost working)
- woocommerce target button with class after ajax update
- Ajax call theme functions from front
- Check if row exists before inserting
- Remove the deleted users avatar from list
- ‘is’ functions and ‘get_query_var’ not working
- when I fetch data from remote mysql database in wordpress built in wordpress function is not working?
- Ajax not working properly
- Function call via ajax – can’t figure it out?
- Updating Media Published Date When Parent Post Is Modified in WordPress
- WP Ajax Function Always Returning undefined
- Scripts not appending to element in AJAX call – why?
- admin-ajax.php + load-scripts.php hanging for minutes
- How to know which ajax file or function is called for action
- How to search using ajax for exact phrase or words in an input field?
- Multisite Ajax serialize return error [object Object]
- Create post using Ajax
- Get User Login Data (date, time… )
- Multisite 404 on pages – rewrite error breaks database
- WordPress listen to $_POST in functions.php
- Load Post into DIV with Ajax
- wordpress use single ajax in place of multiple ajax requests in a smarter way
- Connecting to a 2nd DB gives me no results when querying
- Is There Any Built In WP Functionality For Combining Form Fields To Return Specific Data
- AJAX error handling for submit function in functions file
- echo custom fields with AJAX
- PHP 7.1 | Warning: A non-numeric value encountered in
- processing form data with ajax
- Email Exists ERROR into Ajax registration form
- How to use get_posts() function in functions.php
- wp_usermeta – Read from database, but save function broken
- Ajax resetting my global variable
- contact form in template with jquery,validate and ajax
- get content from page through AJAX
- Get URLs for AJAX Filter Checkboxes WordPress
- Message notification for user
- Woocommerce Variable Product Dropdown for Custom Shop Template
- Database entry removed on browser refresh, Ajax PHP jQuery
- How to loop while adding data to database?
- Detect Ajax call inside pre_get_posts function
- How can I connect to a second database and still be able to use wp functions like get_post_types()?
- Populate Product Regular Price with a calculated ACF Field Value
- Ajax Form Issues using Lightsail (AWS)
- Writing a function for WP Cron to run a SQL command daily
- Update wp_postmeta table based on 2 keys
- CF7 select value get to function and reciept value from function
- post value to function with Ajax and jQuery
- price of product can’t return when get data of product in functions.php
- WP AJAX Request Not Working
- Ajax in plugin fails – but only on one blog – no idea why
- Using AJAX on frontend: Synchronous XMLHttpRequest deprecation except for admin role
- How to use `foreach()` in ajax call
- i can’t use wordpress functions in ajax loaded php file
- Multiple Notifications SetInterval
- admin-ajax.php 403 forbidden only when calling from external file
- Load scripts into an AJAX div
- Load scripts into an AJAX div
- How to create admin ajax function for my contact form
- admin-ajax.php & my wp-admin folder url showing in header
- wordpress function through ajax not being called
- same get_posts function works diffrently in tag.php and functions.php
- wordpress ajax is not working for dropdown selection
- Ajax not working to insert, query and result data
- Automatic add space if user enters number(any digit)
- Database SQL Error, Should Work
- Database Query not working
- functions.php filters not applied in AJAX call
- Pass max posts to Javascript
- Updating site content after an AJAX call without a page reload
- Error function main() is a non-object to construct my Ajax.php
- Function to get the name in database table from the comma separated string
- Pass jquery var to a function in functions.php
- Ajax call does not work for this custom code
- Syntax for a function in order to get post’s title in JSON encoded response [closed]
- Functions file mods and CPU
- Why wp_ajax hooks doesn’t work?
- AJAX values converted to PHP Variables?
- How can I json_encode the output of my function?
- Bulk set Post Title as Tag where Tag is Empty Function
- WordPress Custom wp mail template return full template
- iOS and ajaxComplete
- get page_id in ajax to function in functions.php
- How to get variable from other function inside class function using add_action for Ajax call