[TYPO3] Advanced query not advanced enough - part 2
Luc Franken [TenToday]
typo3 at tentoday.com
Fri May 12 13:15:53 CEST 2006
Kan je hier iets mee? http://bugs.typo3.org/view.php?id=1203
Pieter schreef:
> Hello group,
>
> I use the advanced query to select FE user from certain groups. The
> query looks like:
>
> SELECT username,usergroup,first_name,last_name,
> FROM fe_users
> WHERE
> (
> fe_users.disable != '1'
> AND (
> fe_users.usergroup = '1'
> OR fe_users.usergroup LIKE '%1,%' AND fe_users.usergroup LIKE '%%'
> OR fe_users.usergroup LIKE '%,1%' AND fe_users.usergroup LIKE '%%'
> OR fe_users.usergroup LIKE '%,1,%' AND fe_users.usergroup LIKE '%%'
> )) AND fe_users.deleted=0
> ORDER BY zip
>
> I came to this query with the help of Joey on this list. But there is
> still a situation where the query does not generate the correct result.
> Example: a user is member of the groups 3,5,10 and you want the have
> the users from group 1 only. This user with groups 3,5,10 will be in
> the query. But he is not member of group 1.
>
> I don't see a way to get this right...
>
> Regards,
> Pieter
More information about the TYPO3-english
mailing list