[wp-trac] [WordPress Trac] #2872: Error in SQL syntax

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 28 14:17:15 GMT 2006


#2872: Error in SQL syntax
----------------------+-----------------------------------------------------
 Reporter:  kartlink  |       Owner:  anonymous
     Type:  defect    |      Status:  new      
 Priority:  high      |   Milestone:           
Component:  General   |     Version:  2.1      
 Severity:  major     |    Keywords:           
----------------------+-----------------------------------------------------
 I am getting this on my front page:

 {{{
 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 '6 AND (post_type = 'post' AND (post_status = 'publish' OR
 post_status = 'private' at line 1]
 SELECT DISTINCT blog_posts.* FROM blog_posts LEFT JOIN blog_post2cat ON
 (blog_posts.ID = blog_post2cat.post_id) WHERE 1=1 AND 0=1 6 AND (post_type
 = 'post' AND (post_status = 'publish' OR post_status = 'private')) ORDER
 BY post_date DESC LIMIT 0, 10

 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 '6 AND (post_type = 'post' AND (post_status = 'publish' OR
 post_status = 'private' at line 1]
 SELECT DISTINCT blog_posts.* FROM blog_posts LEFT JOIN blog_post2cat ON
 (blog_posts.ID = blog_post2cat.post_id) WHERE 1=1 6 AND (post_type =
 'post' AND (post_status = 'publish' OR post_status = 'private')) ORDER BY
 post_date DESC LIMIT 0, 10
 }}}

 Archives and posts are working fine. I don't know what triggered this, it
 was working after the last post I made yesterday. Have already repaired
 the tables and it hasn't made any difference.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2872>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list