attention.
-Original Message-
From: R. Hannes Niedner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 11:50 AM
To: Christopher Lyon; MySQL Mailinglist
Subject: Re: sql query using select and row functions
On 1/28/03 8:26 AM, Christopher Lyon [EMAIL PROTECTED] wrote
I am trying to do an sql query and am trying to select the last x rows
from the database. I see the limit function but that seems like that is
from the first row down. I want to start from the last row to the first
row. So, selecting the last 5 rows for instance? Can this be done?
Why not just reverse your order by clause and use Limit 5?
Mike Hillyer
-Original Message-
From: Christopher Lyon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 9:26 AM
To: [EMAIL PROTECTED]
Subject: sql query using select and row functions
I am trying to do an sql query
On 1/28/03 8:26 AM, Christopher Lyon [EMAIL PROTECTED] wrote:
I am trying to do an sql query and am trying to select the last x rows
from the database. I see the limit function but that seems like that is
from the first row down. I want to start from the last row to the first
row. So,
Try ordering the records backwards, e.g ORDER BY id DESC and then limit 0, 5
HTH
JFernando
* sql *
-Original Message-
From: Christopher Lyon [mailto:[EMAIL PROTECTED]]
Sent: January 28, 2003 11:26
To: [EMAIL PROTECTED]
Subject: sql query using select and row functions
I am trying
AM
To: [EMAIL PROTECTED]
Subject: sql query using select and row functions
I am trying to do an sql query and am trying to select the last x rows
from the database. I see the limit function but that seems like that is
from the first row down. I want to start from the last row to the first
row
PROTECTED]]
Sent: Tuesday, January 28, 2003 10:26 AM
To: [EMAIL PROTECTED]
Subject: sql query using select and row functions
I am trying to do an sql query and am trying to select the last x rows
from the database. I see the limit function but that seems like that
is
from the first row down. I
Pendleton; [EMAIL PROTECTED]
Subject: RE: sql query using select and row functions
I would think they would be the same no?
It turns out in the database that they are the same.
-Original Message-
From: Victor Pendleton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 12:23
. Hannes Niedner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 11:50 AM
To: Christopher Lyon; MySQL Mailinglist
Subject: Re: sql query using select and row functions
On 1/28/03 8:26 AM, Christopher Lyon [EMAIL PROTECTED] wrote:
I am trying to do an sql query and am trying
On Tue, 2003-01-28 at 12:26, Christopher Lyon wrote:
I am trying to do an sql query and am trying to select the last x rows
from the database. I see the limit function but that seems like that is
from the first row down. I want to start from the last row to the first
row. So, selecting the
10 matches
Mail list logo