Skip navigation links

MySQL Forums :: Newbie :: Bottom 7 rows, ascending order?


Advanced Search

Bottom 7 rows, ascending order?
Posted by: Sam Borenstein ()
Date: February 13, 2009 05:22PM

I'm new here.

I am making a MySQL run chat, and I need to get the bottom 7 rows in ascending order. The code I have so far is this "SELECT username,body FROM chat ORDER BY id DESC LIMIT 7" which works, aside from the fact that it is in DESC, not ASC.

For this:
--1--
--2--
--3--
--4--
--5--
--6--
--7--
--8--

I want to get this:
--1--
--2--
--3--
--4--
--5--
--6--
--7--

Not this
--7--
--6--
--5--
--4--
--3--
--2--
--1--

Thanks!

Options: ReplyQuote


Subject Written By Posted
Bottom 7 rows, ascending order? Sam Borenstein 02/13/2009 05:22PM
Re: Bottom 7 rows, ascending order? laptop alias 02/13/2009 05:50PM
Re: Bottom 7 rows, ascending order? Sam Borenstein 02/13/2009 06:02PM
Re: Bottom 7 rows, ascending order? Guelphdad Lake 02/13/2009 06:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.