[TYPO3-dev] select distinct in TS

Martin Schoenbeck ms.usenet.nospam at schoenbeck.de
Tue Feb 21 00:25:00 CET 2006


Hi Christian,

Christian Welzel schrieb:

> Thats right, postgres does support "group by" but not the way
> mysql does.
> in mysql you can "group by" by only ONE column but select many.
> like this: 
> 
> SELECT * FROM table GROUP BY some_column;
> 
> and this query does not work in any db other than mysql.
> And as i understood Helge, he suggested using such a query.

He suggested to use GROUP BY 'for relevant fields'. A GROUP BY for all
selected fields will work as a DISTINCT. Even if MYSQL allows to do that
for only one field and selecting more, it also supports the standard logic.

Martin
-- 
Bitte nicht an der E-Mail-Adresse fummeln, die paßt so.




More information about the TYPO3-dev mailing list