[TYPO3-mvc] $query-count() bei suche mit JOIN / Sortierung deutscher Wörter

Illi, Cornelius Cornelius.Illi at student.hpi.uni-potsdam.de
Fri Aug 6 15:29:23 CEST 2010


Hi everyone

I am racking my head on two problems and could need your advice:
First, I implemented a search-function, which also examines properties of aggregated objects. For example:

SELECT u.* FROM u LEFT JOIN x WHERE (x.uid=1 OR x.uid=2)

Where "u" is a company and "x" is an option. A company hence appears twice if it has both options.
As for the actual query it is automatically resolved by a DISTINCT u.*.
In the Count-Query ($query->count()) the DISTINCT is just put in front of a COUNT(*), which cannot work, the way it is supposed to.

A COUNT(DISTINCT u.uid) or a GROUP BY u.uid would work, tough. I think that this is something that requires an extension of the framework, but I could be wrong.

Furthermore, I'd like to know how you resolve comparison of german words? Usually words with german umlauts are put to the end, but a and ä should be in the same place.
One possibility would be to put a "COLLATE 'latin1_german2_ci" to the end of a query, as the collation of the table itself isn't used for a utf8-connection. Any good solutions?

Thanks & Kind regards,

Cornelius


More information about the TYPO3-project-typo3v4mvc mailing list