|
Posted by Barry on 09/08/05 11:15
you should be able to use ORDER BY
SELECT * FROM table ORDER BY name LIMIT 1, 10
by using ORDER BY like this you will be keeping your paging intact.
what criteria are you using to sort by ?
yellow1912 wrote:
> Ok, lets say I have 1000 items in my database (mysql) and want to
> display X items per page. I learned to do it by querying with the LIMIT
> constrain (something like this
> http://www.snipe.net/content/view/12/35/). The problem is I cant sort
> using this algorithm (or maybe I just dont know how to do it). ORDER BY
> didnt do the trick for me :(.
> The only way I can think of is to pass all the item keys/names/anything
> I want to sort into an array, sort them there then pass the array
> between pages. But I really dont like this idea. I know there must be
> better way to do this, anyone can help a newbie?
>
> Thanks a bunch!!!!!
>
Navigation:
[Reply to this message]
|