Database query error
-
There’s a bug in your query line 789
AND p.post_type = %s
– the problem comes when the post type has a – (eg in my case bible-readings) which causes a mysql error. Just needs some quotes round the %s to solve.[16-Jun-2022 05:08:16 UTC] WordPress database error Unknown column 'post' in 'where clause' for query SELECT COUNT(*) FROM wp_djembe563_posts p WHERE p.post_password = '' AND p.post_type = post AND p.post_status = 'publish' AND p.ID NOT IN (6) made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, GoogleSitemapGeneratorLoader::do_template_redirect, GoogleSitemapGeneratorLoader::call_show_sitemap, GoogleSitemapGenerator->show_sitemap, do_action('sm_build_content'), WP_Hook->do_action, WP_Hook->apply_filters, GoogleSitemapGeneratorStandardBuilder->content, GoogleSitemapGeneratorStandardBuilder->build_posts
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Database query error’ is closed to new replies.