----- Original Message ----- 
From: "Ron Beck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 16, 2001 7:12 PM
Subject: Re: Display information

> SELECT id,lot_id,lot_type FROM scrap_table 
> ORDER BY id limit 1932,10;
>
> seemed promising but it put them in oldest-to-newest order (ascending),
> not newest-to-oldest order (desc).  When the "desc" qualifier was added,
> I got records 122 thru 113.  Again, not exactly what I was looking for.

You only have to know the total number of record ,which I think you can easily get

SELECT id,lot_id,lot_type FROM scrap_table 
 ORDER BY id DESC limit TOT - 1932,10

at the present time I don't remember if ther is a way to do it directly from SQL, 
but I don't think it's such a great effort ^^

> What I was actually hoping for was something I could add to my original
> SELECT statement to perform the task if someone entered the ID but would
> show all (limit 10) if there was no entry.  And, I wanted to do it
> without rewriting my code.  Unfortunately, it looks like I may have to
> do a code rewrite for that section, which means documenting, testing,
> acceptance...
> 
> Anyway, thanks for all the suggestions....
> Ron
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to