[TYPO3-project-4-3] fe_group SQL-statement, question out of curiosity

Niels Fröhling niels.froehling at adsignum.com
Sat Jun 13 22:13:35 CEST 2009


Xavier Perseguers wrote:
> Hi,
> 
> 
>> I'd like to know why actually the SQL statement for group-enableFields 
>> contains
>> this condition this way:
>>
>> getMultipleGroupsWhereClause() :=
>>
>> AND (pages.fe_group='' OR pages.fe_group IS NULL OR pages.fe_group='0' OR
>> (pages.fe_group LIKE '%,0,%' OR pages.fe_group LIKE '0,%' OR 
>> pages.fe_group LIKE
>> '%,0' OR pages.fe_group='0') OR (pages.fe_group LIKE '%,-1,%' OR 
>> pages.fe_group
>> LIKE '-1,%' OR pages.fe_group LIKE '%,-1' OR pages.fe_group='-1'))
>>
>> Is there a deeper reason, like an SQL-compatibility issue? Because 
>> this can be a
>> single condition (per group to check for) with 'FIND_IN_SET' and 'FIELD':
> 
> DBAL is part of core and it enables another DBMS than MySQL. For 
> instance Postgres or Oracle...

  So I understand that instead of that we can have optimizing helpers for highly 
complex statements in the DB-implementations, everywhere is just a minimum most 
compatible SQL-expression used? The interface seem to consist of only SUID.
  I didn't yet really understood then, that I actually have to know what exactly 
is the minimum most compatible SQL-expression. How nasty. For performance and 
implementors likewise.

  Thanks for the eye-opener
	Niels


More information about the TYPO3-project-4-3 mailing list