Category Not Found – Just Upgraded – MYSQL Error
-
I am getting that annoying “Not Found” error when trying to show a category page. No, it is not the Permalinks – I tried everything.
Any help would be great.wp-db.php L 1053 WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1] SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id = 54
I wrote the queries to an external file and they do not seem truncated like the above one. This is what I see. The debugger was enabled and I am getting the following in query.php around lines 2642 and 2699 for one page load of a categor ypage.
----- query.php : 2642 $where: AND ( wp_term_relationships.term_taxonomy_id IN (54) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ----- query.php : 2642 SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (54) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10. ----- query.php L 2699 QUERY: SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (54) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10 ----- query.php : 2642 where: AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ----- query.php : 2642 SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC LIMIT 0, 5. ----- query.php L 2699 QUERY: SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC LIMIT 0, 5 ----- query.php : 2642 where: AND wp_posts.ID IN (183) AND wp_posts.post_type = 'nav_menu_item' AND (wp_posts.post_status = 'publish') ----- query.php : 2642 SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (183) AND wp_posts.post_type = 'nav_menu_item' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.menu_order ASC . ----- query.php : 2642 where: AND ( wp_term_relationships.term_taxonomy_id IN (54) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') ----- query.php : 2642 SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (54) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10. ----- query.php L 2699 QUERY: SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (54) ) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10 ----- query.php : 2642 where: AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ----- query.php : 2642 SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC LIMIT 0, 5. ----- query.php L 2699 QUERY: SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.post_date DESC LIMIT 0, 5 ----- query.php : 2642 where: AND wp_posts.ID IN (183) AND wp_posts.post_type = 'nav_menu_item' AND (wp_posts.post_status = 'publish') ----- query.php : 2642 SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (183) AND wp_posts.post_type = 'nav_menu_item' AND (wp_posts.post_status = 'publish') ORDER BY wp_posts.menu_order ASC .
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Category Not Found – Just Upgraded – MYSQL Error’ is closed to new replies.