At 11:48 AM -0300 10/2/01, Ashwin Kutty wrote:
>Hi,
>
>I have been using the ORDER By clause in one of my sql queries and
>it works fine; however when I combine it with a LIMIT it still
>order's the results by it doesn't do it the way its supposed to, for
>example:-
Your examples don't show the actual queries you're using, so it's difficult
to say whether or not they're working correctly.
>
>Order By clause without Limit returns:-
>A
>B
>C
>C
>C
>C
>C
>C
>M
>N
>T
>W
>
>Order By clause with Limit returns:-
>
>C
>C
>C
>C
>C
>C
>M
>N
>T
>W
>
>Is there any way to fix this, so that the results with the limit
>comes out starting with the A and then moves on to the next pages?
>
>Also, can I add a count(*) in my sql statement to get the total
>number of records even though I would be using Limit? I tried
>something along the lines of:-
>SELECT *, COUNT(*) from table where column like keyword order by
>title desc limit 0,10; and that dint work, so any ideas?
You'll be able to do this in MySQL 4.0.
--
Paul DuBois, paul@stripped