MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:March 12 1999 6:30pm
Subject:Re: Navigation Through DB
View as plain text  
On Fri, Mar 12, 1999 at 09:43:23AM +0000, Kevin P. O'Brien wrote:
> I need to know the syntax in the perl script to call --> First,
> Last, Next, Previous --> Record

This is a long answer.  Unfortunately I don't have any example
code to show you.  It all depends on how you're calling your
CGI script, what your selects look like, etc.

But:  You'll want to use LIMIT in your queries; you can use
ORDER BY ... DESC LIMIT 1 to get the last record.  To get Next
and Previous, you need to store which record you're looking at
(pass it as a hidden variable in your HTML form) and then do
something like ... LIMIT @{[$current_record + 1]}, 1 (for Next).

Navigation Through DBKevin P. O'Brien12 Mar
  • Re: Navigation Through DBThimble Smith13 Mar
Re: Navigation Through DBKevin P. O'Brien13 Mar
  • Re: Navigation Through DBMichael Widenius15 Mar
Re: Navigation Through DBKevin P. O'Brien13 Mar