[wp-trac] [WordPress Trac] #11823: Improve SQL query used by get_terms()

WordPress Trac wp-trac at lists.automattic.com
Sat Jul 3 12:37:46 UTC 2010


#11823: Improve SQL query used by get_terms()
-------------------------+--------------------------------------------------
 Reporter:  sirzooro     |       Owner:  filosofo               
     Type:  enhancement  |      Status:  new                    
 Priority:  normal       |   Milestone:  Future Release         
Component:  Taxonomy     |     Version:  3.0                    
 Severity:  normal       |    Keywords:  has-patch needs-testing
-------------------------+--------------------------------------------------

Comment(by dd32):

 instead of those ugly loops, something similar to this might be possible?

 {{{
 $interms = array_map('intval', $interms);
 $inclusions = ' AND t.term_id IN ( ' . implode(',', $interms) . ' )';
 }}}

 (note, Untested, and havnt looked at the code closer than the patch)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11823#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list