[TYPO3-dev] A search query question
Tapio Markula
tapio.markula at xetpoint.fi
Thu Aug 21 15:50:16 CEST 2008
Sacha Vorbeck kirjoitti:
> Hi,
>
>> Commonly there are queries like pid IN (...)
>>
>> But I would need opposite (list of pages, which must exclude from
seach) and pid NOT IN (...) didn't work - what's the correct
>
> not a direct answer to your quetion but: IN is powerful as it can
contain a sub-query but often find_in_set is sufficient and you can
easily negate it:
>
> SELECT line, category
> FROM lines
> WHERE FIND_IN_SET('4',category)>0;
how to negate that? I mean found values should be skipped and not taken
to the result array
the problem of NOT IN(...) is that if that is empty, it cause error but
FIND_IN_SET('4',category) can be empty
More information about the TYPO3-dev
mailing list