[dev] Horde_Rdo_Query - composing and decomposing

Ralf Lang lang at b1-systems.de
Sat May 12 11:10:53 UTC 2018


I think Horde_Rdo_Query_Literal might be what you are looking for


Am 10.05.2018 um 20:49 schrieb Sebastian Birnbach:
> I am working on a search form that reiterates a db query over several
> results pages. Every time you press "next" you are shown the next 10
> results returned by the same search. For this I basically store the search
> parameters in form variables and change the search offsets on every form
> submission. This went well for simple searches but has gotten a bit tedious
> with more complex ones.
>
> $mapper is my Horde_Rdo_Mapper
> $q is my Horde_Rdo_Query. I create it with new Horde_Rdo_Query($mapper) and
> add fields and options as required.
>
> One seemingly elegant way would be to get the SQL search string via $string
> = $q->getQuery()[0] and store it in a form variable. Later on it is easy to
> take the mapper and conduct a search: $mapper->find($string). However I,
> need to manipulate the offset fields in the query before find() is called.
> Plus the actual search string is an extra argument to the search and seems
> not available this way.
>
> Is there a good way to turn a SQL query string back into a Horde_Rdo_Query?

-- 
Ralf Lang
Linux Consultant / Developer
Tel.: +49-170-6381563
Mail: lang at b1-systems.de
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537



More information about the dev mailing list