RE: sql query using select and row functions

2003-01-29 Thread Christopher Lyon
erts on the mysql list than me) but also > for the benefit of others with a similar problem (although there is a > rather > big lag from posting to appearing on the list). The list archives also > getting way to little attention. > > > > > >> -----Original Messa

Re: sql query using select and row functions

2003-01-28 Thread Adolfo Bello
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

Re: sql query using select and row functions

2003-01-28 Thread R. Hannes Niedner
tention. > >> -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

RE: sql query using select and row functions

2003-01-28 Thread Victor Pendleton
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

RE: sql query using select and row functions

2003-01-28 Thread Christopher Lyon
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 PM > To: Christopher Lyon; [EMAIL PROTECTED] > Subject: RE:

RE: sql query using select and row functions

2003-01-28 Thread Victor Pendleton
Do you mean the last five rows in the database or the last five rows entered into the database? Either way, Last five rows select [someColumn] from [someTable] ORDER BY [someColumn] DESC LIMIT 0, 5 If the total number of rows is known select [someColumn] from [someTable] ORDER BY [someColum

RE: sql query using select and row functions

2003-01-28 Thread Fernando Grijalba
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 to do

Re: sql query using select and row functions

2003-01-28 Thread R. Hannes Niedner
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,

RE: sql query using select and row functions

2003-01-28 Thread Mike Hillyer
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 an