Cuando finaliza la paginación, quiero hacer los enlaces siguiente y anterior en una página de objeto en particular

I'm working about some listing and gallery in codeigniter with PHP. I've done all the searches and good search result page with pagination.

Now when I click on position in my search results list it gets me into page with single result, description etc.

My question is: how to smartly make "next" and "previous"links on this single result page? After clicking next it goes to the page of next result etc.

Is there any other way than storing full search results in some array while browsing?

preguntado el 31 de julio de 12 a las 12:07

store the SQL instead and the index, then use limit (index-1,3 to get prev, current and next) -

1 Respuestas

You can store the search conditions instead (much smaller -> can be stored for a long time, so you don't need to obfuscate the UX by sometimes showing prev/next and sometimes not) and add some generic user-independent caching layer to the search results. (This assumes that search results are not personalized and don't change much in time.)

Respondido 31 Jul 12, 12:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.