Horde_Rdo_Query - composing and decomposing
Sebastian Birnbach <[email protected]> Thu, 10 May 2018 20:49:01 +0200
| Newsgroups | gmane.comp.horde.devel |
|---|---|
| Message-ID | <CACTNBFO=VidoYbCBPWivU0iDXQX=iYpg_Pm8VBD-vp=sA+8VYg@mail.gmail.com> |
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? -- dev mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]