[TYPO3-english] pi_list_query (pi_exec_query) does not take into account the groupby clause when count is enabled
    Jigal van Hemert 
    jigal at xs4all.nl
       
    Mon Jul 12 19:29:22 CEST 2010
    
    
  
Jochem Nabuurs wrote:
> can anybody tell me why pi_list_query does not take into account the 
> groupby clause when count is enabled. Is this a performance related 
> design choice? I'm no mysql guru so I guess there is a good explaination.
The PHPdoc comments say that pi_list_query is deprecated since 3.6 (!). 
Unfortunately it is not logged in the deprecation log, so I doubt that 
it will be removed in 4.5 (also because 4.5 will be the Long Term 
Support version).
Strangely enough it suggests to use pi_exec_query(), which uses 
pi_list_query to build the query parameters.
It's better to use the t3lib_DB functions for queries IMO.
> The reason why I'm asking this is while I was playing with the 
> dam_downloads extension I noticed duplicate records in the listView 
> mode. This was caused by files having multiple DAM categories assigned. 
> Therefore they where displayed for each category assigned to the file.
> The extension uses pi_exec_query to list results, but does it incorrect, 
> according to my findings.
Well, you probably know the way to go :-) Bug report, maybe a patch...
-- 
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
    
    
More information about the TYPO3-english
mailing list