[TYPO3-english] EXT: DB Integration (wfqbe) - Problem with search form query
sabine deeken
sabine.deeken at web.de
Fri Apr 3 10:48:19 CEST 2009
Hi Flo,
did you find out meanwhile? I had only 2 searchfields, but the where or
thing is bad. I remember problems when the first element was removed, so
I filled it which always worked, like uid > '1' or so (in my site it
was a typoscript-marker which i had to use anyway) and put the
where-clauses which were propably be removed as second and third statement.
sabine
Flo schrieb:
> ok, thanks, that did the trick!
>
> one last question, do you use it with more than 2 search fields, because
> as soon as I have a 3rd field, it's not working anymore.
>
> I get a query like this:
> SELECT * FROM bdb_datenbank WHERE OR bdb_datenbank.Autor LIKE '%1%'
> ORDER BY bdb_datenbank.ID ASC
>
> WHERE OR is of course bad ;)
>
> the two other fields are working fine, this problem only occurs if I
> input something in the 3rd search field.
>
> flo
>
> sabine deeken wrote:
>
>> not search query id; search result query id
>> Flo schrieb:
>>
>>> ok, now I'm stuck.
>>>
>>> I created an extension like in the manual described, changed the uid to
>>> my search query id, changed the marker names.
>>>
>>> added this to the setup in my root template:
>>>
>>> plugin.tx_wfqbe_pi1.customQuery.2 {
>>> WFQBE_TITEL.overrideIfEmpty = 1
>>> WFQBE_AUTOR.overrideIfEmpty = 1
>>> WFQBE_KURZBESCHREIBUNG.overrideIfEmpty = 1
>>> }
>>>
>>> and it's still not clearing the fields, any idea what I could have
>>> missed?
>>>
>>> thanks, flo
>>>
>>> sabine deeken wrote:
>>>
>>>
>>>> template setup
>>>>
>>>> Flo schrieb:
>>>>
>>>>
>>>>> oh, I read the manual, but didn't looked at the hooks, my fault.
>>>>> thanks for the hint. and now where exactly do I add this:
>>>>>
>>>>> plugin.tx_wfqbe_pi1.customQuery.2 {
>>>>> WFQBE_TITEL.overrideIfEmpty = 1
>>>>> WFQBE_AUTOR.overrideIfEmpty = 1
>>>>> WFQBE_KURZBESCHREIBUNG.overrideIfEmpty = 1
>>>>> }
>>>>>
>>>>> 2 is the id of my search query, do I add this in the TSconfig of the
>>>>> search page?
>>>>>
>>>>> bye, flo
>>>>>
>>>>> sabine deeken wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Hi Flo,
>>>>>> there is a hook to remove empty where clauses (it's described
>>>>>> comprehensively in the extension manual).
>>>>>> with text input searchfields this works perfect (I had only problems
>>>>>> with multiple selects)
>>>>>> so better read the manual first...
>>>>>> Sabine
>>>>>>
>>>>>> Flo schrieb:
>>>>>>
>>>>>>
>>>>>>> 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
>>>>>>> _______________________________________________
>>>>>>> TYPO3-english mailing list
>>>>>>> TYPO3-english at lists.netfielders.de
>>>>>>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> _______________________________________________
>>>>> TYPO3-english mailing list
>>>>> TYPO3-english at lists.netfielders.de
>>>>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>>>>
>>>>>
>>>>>
>>> _______________________________________________
>>> TYPO3-english mailing list
>>> TYPO3-english at lists.netfielders.de
>>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>>>
>>>
>>>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>
More information about the TYPO3-english
mailing list