Link to home
Start Free TrialLog in
Avatar of dda
ddaFlag for Russian Federation

asked on

Multi-page database search results display

Hello.

I need to do a query against some database and display results row by row with CGI (perl) script. It's simple. But if I need to show only a certain portion of results, and then provide "next>>" and "<<prev" links? What technique can be used for this task? Temporary tables with search results? Too expensive.

Database can be Oracle or MySQL.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of dorward
dorward

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dda

ASKER

Ok, and what about Oracle Database? Will LIMIT and OFFSET work for conditioal queries effectively?
Avatar of dorward
dorward

Offset and Limit certainly work in MySQL, but a google search _suggests_ that Oracle doesn't have this functionality.

A google search turns up:
  http://gentle.org.uk/howto/xmetapostgres.htm

Turn JavaScript on and toggle the radio buttons on the final textarea to see equilivent code.
Avatar of dda

ASKER

Thanks for the link! You answer is good.
But I'd like to hear about other possible approaches as well.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dda

ASKER

Hmm.. What is 'id' here? I'm selecting rows from several tables (joined), filtered and ordered. I think that using 'id' is not possible here, unless you are talking about some temporary table with search results, already ordered the way I need.

Any other ideas? Platforms, frameworks?