List:General Discussion« Previous MessageNext Message »
From:Rhino Date:March 20 2005 3:50pm
Subject:Re: Select previous group
View as plain text  
  ----- Original Message ----- 
  From: Carl 
  To: mysql@stripped 
  Sent: Sunday, March 20, 2005 8:38 AM
  Subject: Select previous group

  Seems like there should be a simple solution to my problem but I have been unable to
find it.

  Suppose you have a phone book of names, addresses, etc.  You are looking at page 100 and
want to now see page 99.  (The person data is, of course, dynamic so a specific name is
not tagged to a specific page.)  How can I select the names for page 99 (in this case)
knowing only the first name on page 100 and the number of names I want to display?



The answer is: it depends. Are you trying to accomplish this in SQL from a command line or
batch script or are you doing this in a program? If you are using a programming language,
which one are you using and what version of the language are you using? Also, what version
of MySQL are you using? Different versions have different capabilities. 

In brief, it is easier to do what you are describing - scrolling backwards through a
result set - in a programming language like Java than it is in straight SQL; I'm not even
sure if it is *possible* in straight SQL but greater minds than mine may have figured out
a way. Even within programming languages, it can be tedious to manage or relatively
straightforward; for example, using (Java) JDBC 1.0, it is fairly tedious to scroll
backwards through a result but later versions of JDBC make it relatively easy.

Attachment: [text/html]
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 15/03/2005
Select previous groupCarl20 Mar
  • Re: Select previous groupRhino20 Mar
  • Re: Select previous groupPeter Brawley20 Mar