[wp-trac] [WordPress Trac] #4069: query_posts('category_name=test')
 = database error
    WordPress Trac 
    wp-trac at lists.automattic.com
       
    Mon Apr  2 17:17:40 GMT 2007
    
    
  
#4069: query_posts('category_name=test') = database error
-----------------------+----------------------------------------------------
 Reporter:  devil1591  |       Owner:  anonymous
     Type:  defect     |      Status:  new      
 Priority:  high       |   Milestone:  2.2      
Component:  General    |     Version:  2.2      
 Severity:  blocker    |    Keywords:           
-----------------------+----------------------------------------------------
 If you make a
 {{{
 <?php query_posts('category_name=test'); ?>
 }}}
 before your loop, you will have this error
 {{{
 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 ') AND rel_type = 'category' AND (post_type = 'post' AND
 (post_st]
 SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_post2cat
 ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_categories ON
 (wp_post2cat.category_id = wp_categories.cat_ID) WHERE 1=1 AND category_id
 IN () AND rel_type = 'category' AND (post_type = 'post' AND (post_status =
 'publish' OR post_status = 'private')) GROUP BY wp_posts.ID ORDER BY
 post_date DESC LIMIT 0, 10
 }}}
 Tested on a fresh trunk install
-- 
Ticket URL: <http://trac.wordpress.org/ticket/4069>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
    
    
More information about the wp-trac
mailing list