[TYPO3-english]  special query
    Christian Tauscher 
    christian.tauscher at media-distillery.de
       
    Mon Oct 13 08:46:21 CEST 2008
    
    
  
This mail was already posted in direct-mail list, but unfortunatelly no
solution was found.
Maybe you know what to do?
Christian.
--------------
Hi dear direct_mail users/developers!
I use sucessfully tt_address as table for recipients. I have extended
via EXT:user_*** the fields in tt_address with
newsletter
category
The cateory field ist a comma separated list of intergers.
Trying to bild a special query looks first simple, but I failed finally.
Example: Select all recipients with cat 1 OR cat 32
Created by direct_mail:
SELECT uid,pid,deleted FROM tt_address WHERE (
	newsletter = '1'
	AND (category & 1)=1
	AND (category & 32)=32
	AND ...so on
	)
AND tt_address.deleted=0
This is a nice try, but what I mean is:
SELECT uid,pid,deleted FROM tt_address WHERE (
	newsletter = '1'
	AND
	(
		(category & 1)=1
		OR
		(category & 32)=32
		OR
		...so on
	)
)
AND tt_address.deleted=0
Mind the brackets and the OR
How to do this?
is there a way to wirite the query manually? This would be a nice feature.
Thanks for your help,
Christian.
    
    
More information about the TYPO3-english
mailing list