Re: Horde_Rdo_Query - composing and decomposing
Ralf Lang <[email protected]> Sat, 12 May 2018 13:10:53 +0200
| Newsgroups | gmane.comp.horde.devel |
|---|---|
| Message-ID | <[email protected]> |
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: [email protected] B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 -- dev mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]