You are here: Re: Display X Items per page with sort option? « PHP Programming Language « IT news, forums, messages
Re: Display X Items per page with sort option?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация