Well, since I haven’t used a LIKE in a plugin in a while, it seems I missed this one.
WP is now adding ‘placeholders’ whenever you prepare or esc a query. The short solution I found was to do this. It may not be the proper one, but it works.
$sql = $wpdb->remove_placeholder_escape($wpdb->prepare("SELECT ID FROM $ignore_url_table_name where '%s' LIKE CONCAT('%',url,'%')",$urlRequested));
Related Posts:
- Should I use wpdb prepare?
- Activation hook not creating table
- $wpdb -> Batch insert from XML File?
- $wpdb->prepare is not working like mysql_real_escape_string
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- $wpdb how can i save my postmeta table before querying it
- Nothing happens on WordPress Update command
- Is it mandatory to use $wpdb->prefix in custom tables
- $wpdb->insert_id
- Check for success of $wpdb->update() correctly
- Getting wrong relationship value in $args in wp_Query?
- WordPress and multithreading
- Does using set_transient() function can lead to MySQL problems?
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How is the data stored in the database?
- $wpdb->insert is changing a value
- Actions or filters fired when data is saved in a custom table
- Retrieving custom fields with $wpdb->get_results
- Custom Plugin Database relations
- why creating tables using $wpdb is not being executed while installing plugins?
- $wpdb->get_results() does not fetch results with unicode ‘WHERE’ clause
- How to use mysql IN statement with wpdb update method?
- Using $wpdb object in a widget
- How can I free up the memory used by update_post_meta?
- Passing array of strings to a SQL statement in a WordPress plugin
- Is the usage of ON DELETE CASCADE wrong or not allowed on wordpress?
- How to edit mySQL wp_posts table from plugin php?
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- query users by role
- How to Download and install plugin database remotely
- How to insert data to a database table when the field is not yet created?
- Where to store the name of a custom table?
- include wp-blog-header not working on MAMP
- creating custom function to log actions in plugin
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- SQL query for custom taxonomy slugs
- Issue regarding $wpdb->prepare()
- Error on inserting a form value to database
- How to create database table, add data, update and delete using wpdb via plugins?
- Using WPDB to output raw XML fails because of wp-blog-header.php
- Creating mySQL procedure with $wpdb
- how to search users by ajax live search
- Adding custom end points, No error line
- Intermittent database errors when accessing WordPress database
- Update results, Before deleting the related category [closed]
- Storing data in wordpress database from ajax call from different website
- wp query foreach deleting record returning only first or last item
- How to add user details to different tables immediately after user registration
- mysql_real_escape_string() vs. esc_sql() in WordPress
- wpdb->prepare and mysql UPDATE – how is it done?
- How to get all queries’s results after they have executed?
- Custom array from a query only write the last row of the query
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- $wpdb->update() always need a second try
- Using AND and bracket grouping in SQL not working
- Two different wordpress sites – same server and IP address. Gaining Access to database 1 of 2
- How can I programmatically change a MySql variable (foreign_keys_check)?
- Data inserted by wpdb insert is different than data pressnt in database.
- Proper Prepare Statement for ALTER TABLE and using AFTER
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- Brainstorm – Slow Query from Plugin Need to Speed It Up
- How to avoid conflicts with db.php / $wpdb and other plugins that decide to use them?
- $wpdb in php 5.5
- Create an user on external database
- What could cause a WP Option to get truncated?
- select a single val though a table in wordpress
- Plugin to create Posts and Forums then choose category and parent forum
- $wpdb->update Issue
- Why doesn’t my Table get created?
- Foreign wp_users ID in custom plugin DB table?
- How to Get Last ID?
- How to display specific data from a custom table to logged in users with a custom role
- $wpbd->insert_id is returning null
- Insert, update or remove data from database (usermeta)
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- WordPress Query doesn’t return the correct value
- Error Connecting to Database WHEN Installing WordPress on XAMPP [Tried All the Usual Stuff] (Pics Included)
- Is it possible to replace MySQL with JSON files for WordPress
- bindParam? WordPress 4.9.5 SQL LIKE statement %s and %LIKE%
- WordPress doesn’t create table on plugin activation
- Update database record in plugin
- WordPress delete mysql rows with string
- Organising and completing posts (mark as read and hide)
- pull data from wordpress database
- Dedicated server and WPDB Class : huge slow-down of the website
- How to implement pagination into a wpdb->result query?
- Plugin MySQL SELECT custom data and filter on user meta
- How to CRUD from wordpress database in wordpress theme?
- sql query not working in wp plugin
- $wpdb Mysql trigger problem
- Custom MySQL query to pull out Advanced Custom Fields?
- I can’t write in my DB using $wpdb->insert
- How to filter get_adjacent_post()?
- WordPress plugin tables become corrupt
- Fixing plugin for wpdb::prepare
- Get all the related data from WordPress DB
- multiple record insert creating many duplicate records