Your question isn’t much of a WordPress related question, more like a MySQL question.
But I have sort of a solution in my head:
You could go with a custom query and a replace on the apostrophe:
SELECT * FROM `table`
WHERE REPLACE( `column`, "'", "") LIKE REPLACE( 'string', "'", "" )
For a combined search:
SELECT *, REPLACE( `column`, "'", "" ) AS `custom`
WHERE `column` LIKE 'string'
OR `custom` LIKE 'string'
It isn’t worlds most beautiful solution, but you could give it a shot.
Related Posts:
- Ideas how to search & replace post_content when string contains a newline?
- How to make MySQL search queries with quotes
- what are the numbers between curly brackets in search query
- simple sql query on wp_postmeta very slow
- How many WordPress SQL Queries per page?
- Search custom post type by meta data
- Multipart/formatted MySQL query problem
- Search and replace text across all posts
- Search Terms – Querying on either description__like OR name__like in the same Term Query?
- Fulltext search in posts sorted by relevancy
- Custom Query to search through categories
- search through post-type attachments titles
- Are database queries created using WordPress filters protected from SQL injection?
- Grouping related postmeta data via SQL query
- Mysql / WordPress killing my server with 80k users [closed]
- Slow meta_query with about 4 milion record on wp_postmeta
- Select User by Joining Multiple Meta Value Results
- mySQL query. ORDER BY meta_key
- How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?
- Change searched term
- Update slug (URL) of pending posts via phpMyAdmin
- My SQL function to change user_name
- You have an error in your SQL syntax – Help with query
- MySQL variable in query
- Search query -> Show all pages except certain template
- Temporarily storing main search result
- how would I create a custom query to get all users, and a related post based on a postmeta field?
- Help with MySQL to $WPDB query
- SQL query to select posts from multiple categories
- How do I see the mysql query generated by get_posts( $args )?
- Alter query with posts_clauses to retrieve NULL values last
- Query based on title, with ‘compare’ => ‘IN’
- is_search called incorreclty
- MySql Query very slow
- Attempt to improve WP search, can someone check my SQL query?
- WordPress Query wp-terms SLOW
- wpdb COALESCE won’t work
- How to reset usual $query on search page to push custom $wpdb query there?
- Get posts from category with custom query
- how to insert missing tags into the posts through mySQL?
- How to insert Collate into WordPress search query?
- Valid SQL query return empty
- mysql query – how to escape apostrophe?
- Slow Search Queries – How to exclude pages, media, excerpt, authors, private posts?
- Query the WordPress database to get data together with replaced information
- How to interfere to default search to make it search in custom fields?
- Optimize slow SQL query for multiple meta values
- Updating with $qpdb->query() always returns 0 rows affected
- How to manage a particular “order by” for get_search_query()?
- How to return count of custom post type posts with a specific custom field value via $wpdb?
- WordPress Mysql query and Duplicate
- Help with Related Posts Function
- How to delete all images from code in all post_content
- WordPress search in modified post title
- Filter orders by modify date
- How to add url parameter to every search query in SearchWp?
- I want to get on those users their meta value are like “AGENT” .. but this query is not working
- Add rewrite rule for archive search
- Displaying data from custom table
- Get 2 meta values from meta key column
- Restrict WordPress search to a single ACF field
- PHP Fatal error: Uncaught Error: Call to a member function insert() on null
- SQL query to delete users with multiple meta keys and comments
- Modify behaviour of “s” parameter in wp_query
- Sort by postmeta on when searching
- OR condition not working
- Trouble migrating custom post types from non-wordpress cms
- Pagination adds search query (again)
- Speed up search query that searches in post meta?
- Are there any best practices for creating a Like/Favourite feature in WordPress using custom MySQL tables and without any plugins?
- Performance of wp_get_attachment_image_srcset() and wp_get_attachment_image_url()
- $query->set( ‘post_type’, ‘post’ ); not working
- Custom MySQL Query for Post and Post Meta
- search.php is not generating the right results
- Run search query again without pagination gives no results?
- Mysql query and odd results
- sql for querying post and their category
- Access Tables with number prefix
- is it possible to get a list of URLs from post_content directly in a mysql query via phpadmin?
- Custom API how to return int field
- Problem in MySql query on WordPress [closed]
- is_search called incorrectly
- Search results stuck on page 1
- How to use a dynamic term id for the query block
- Querying Posts from ACF Repeater Subfield Select Value
- How to figure out correct wp_options to have autoload=’yes’
- Advanced Search – Is this possible?
- Meta Query compare with LIKE pulls similar post types: 55 and 155, and 1,155
- How to show sticky posts on all pages of the pagination, not just the first page?
- Searching for a custom meta from user.php in the admin
- Why does $_GET return values but get_query_var does not?
- Sort users in admin screen by meta value whether it exists or not
- Remove posts that start with similar words (like a delete duplicate posts plugin)
- Modify WordPress Search
- Can I make a Heading block above a query loop block disappear when that query loop has no results?
- Get URL parameters with rewrite rules
- Elementor – Sort by name
- Rewrite URL custom search query
- pre get posts not working with Tribe Events
- How do you create a query to hide all posts with a certain meta key, unless current user is the author of that post, without custom SQL?