The reason is due to this code inside dbDelta()
:
// Create a tablename index for an array ($cqueries) of queries.
foreach ( $queries as $qry ) {
if ( preg_match( '|CREATE TABLE ([^ ]*)|', $qry, $matches ) ) {
$cqueries[ trim( $matches[1], '`' ) ] = $qry;
$for_update[ $matches[1] ] = 'Created table ' . $matches[1];
} elseif ( preg_match( '|CREATE DATABASE ([^ ]*)|', $qry, $matches ) ) {
array_unshift( $cqueries, $qry );
} elseif ( preg_match( '|INSERT INTO ([^ ]*)|', $qry, $matches ) ) {
$iqueries[] = $qry;
} elseif ( preg_match( '|UPDATE ([^ ]*)|', $qry, $matches ) ) {
$iqueries[] = $qry;
} else {
// Unrecognized query type.
}
}
ths function dbDelta()
does not support ‘REPLACE INTO’ and that calls in the else
with // Unrecognized query type.
comment.
Related Posts:
- How to display SQL query that ran in query?
- Custom query_var causes displaying posts archive on front page
- What is the most efficient way of implementing a favorite post system?
- Why does get_the_time(‘F j’) return November 30 for all posts?
- Query by one meta_key and sort by another (possibly NULL value)
- Query & Sort Comments by custom comment meta
- Count user posts by user ID, Post type and Post status
- is_archive() doesn’t work on public query var archive pages?
- search through post-type attachments titles
- How to count get_users query?
- cron job to auto delete posts of a specific post type older than x days
- Possible to get posts from multiple meta keys/values in a single query?
- Most effective use of DB querys
- Difference between fragment caching and wp_cache
- How to display all posts with today’s same month and day only?
- Two differents queries in archive page
- Select User by Joining Multiple Meta Value Results
- How do I find if a page has a template?
- Show featured image as background image from postQuery
- How to set back query var author_name after unset it?
- Using $wpdb->update but confused on the WHERE in and SET
- My SQL function to change user_name
- You have an error in your SQL syntax – Help with query
- How to retrieve elements from another table in a SQL query?
- Make one query for adding entries to database
- add_query_arg() and empty variables inside
- Query Strings and Woocommerce
- Style Post Differently In Query
- WordPress post type “event” query string fix?
- Order posts by custom field DATE value
- order one custom post type by modified time of another post type
- Form redirect with query vars to page
- is_search called incorreclty
- Function to delete a post, it’s children and it’s grand children (half way there already)
- Nested loop : wich way/order?
- WordPress custom setting page – add flashing message
- Custom query AFTER rss fetch_feed not working
- Dynamically adjust single-posttype.php query, based on current taxonomies
- list all categories that have a certain word in title
- Passing parameters to a static front page
- Use mysql_query instead of $wpdb query
- sort query results by newest
- How to reset usual $query on search page to push custom $wpdb query there?
- get_posts showing only 5 posts. (nopaging and posts_per_page -1 not working)
- Order by meta value pro first then meta value free in my search function
- Display posts between two particular dates
- Order posts by date, but also give priority for a specific term
- $post->ID not working in combination with a custom query
- How to delete all posts, categories and tags from WordPress database
- Ideas how to search & replace post_content when string contains a newline?
- Combine “Exclude” Query in functions.php
- Query the WordPress database to get data together with replaced information
- $wpdb->prepare affecting the query?
- WordPress SQL search, how to handle SQL Injection?
- Query for Custom Post Type UI Does Not Loop All the Post
- Updating with $qpdb->query() always returns 0 rows affected
- Wrap/close ‘query’ for a first-letter ordered listing of posts
- wpdb query with dynamic column name?
- How do you display the number of a post in a query?
- How to manage a particular “order by” for get_search_query()?
- Query to view scheduled or draft post
- How can I get the name of term post meta value which equals term id
- How to add a Variable to post query
- get products by custom date variable
- Sort a list of a CPT ( job) if a meta is empty
- How to delete all images from code in all post_content
- How to sort by two meta keys in admin area?
- Restrict WordPress search to a single ACF field
- wp query multiple values > display a specific value first
- PHP Fatal error: Uncaught Error: Call to a member function insert() on null
- Nested select statements not working
- Restore WordPress Backup Locally?
- Trouble migrating custom post types from non-wordpress cms
- Pagination adds search query (again)
- “order” does not affect order of custom query
- Create a new post on a specified publish date via link?
- Exclude Posts from a Widget
- Fastest and most efficient SQL query to check if UID exists
- New custom post type entries are not sorted correctly in admin using pre_get_posts
- Query String for the WP_QUERY parameters
- Counting And Monitoring How Much Queries My Script Used
- $wpdb query for price in custom field value
- Multiple terms not working on taxonomy
- Sorting of coupons in the right way
- search.php is not generating the right results
- excludeCat function reverses order of blog posts
- Run search query again without pagination gives no results?
- Filter the feed page post limit
- WP_Query orderby meta key/value suddely stopped working
- How to get one result using wpdb class?
- Delete query won’t run
- Where can I find the SQL to get the most used information by wordpress database?
- WooCommerce Total # orders [closed]
- Modify a query using both a text field and a true/false AFC field
- How do I troubleshoot Maximum execution time of 60 seconds exceeded in updating a Media File?
- update $wpdb one query
- Admin Post List table Query filtering “WHERE” for custom post type
- Ascending & descending posts on same page with IF statement
- How to use a dynamic term id for the query block
- Meta Query compare with LIKE pulls similar post types: 55 and 155, and 1,155