[TYPO3-english] EXT: DB Integration (wfqbe) - Problem with search form query

Flo admin at pulk.net
Wed Mar 25 11:02:02 CET 2009


Hi,

I have a little problem with understanding the right way to do a search
query.

in the moment I have the following query:

SELECT bdb_datenbank.ID, bdb_datenbank.Verlag, bdb_datenbank.Titel,
bdb_datenbank.Thema, bdb_datenbank.Kurzbeschreibung, bdb_datenbank.Autor
FROM bdb_datenbank WHERE bdb_datenbank.Titel LIKE '###WFQBE_TITEL###' OR
bdb_datenbank.Autor LIKE '###WFQBE_AUTOR###' OR
bdb_datenbank.Kurzbeschreibung LIKE '###WFQBE_KURZBESCHREIBUNG###' ORDER
BY bdb_datenbank.ID ASC

and in the searchform I have the 3 fields, wich search for "Autor",
"Titel" and "Kurzbeschreibung".
this works so far.

but what I need is something like this:

WHERE bdb_datenbank.Titel LIKE '%###WFQBE_TITEL###%'

I need a %LIKE...% operator, if I add them before and after the marker,
I would get the results I need, but if only one search field is filled
out, the other 2 remains empty with 2 times "%", wich is displaying me
all of my database entries (of course! ;))

what is the right way to do this?

best regards, flo weber


More information about the TYPO3-english mailing list