You are here: Re: question about processing MySQL query result « PHP Programming Language « IT news, forums, messages
Re: question about processing MySQL query result

Posted by Andy Jeffries on 06/22/06 08:04

On Thu, 22 Jun 2006 01:00:32 -0700, Sjoerd wrote:
>> Now i'd like to implement a page function to separate 1000 records into
>> 20 pages.
>
> Add a LIMIT clause to the query.
> First page: LIMIT 0, 20
> Second page: LIMIT 20, 20
> and so on.
>
> http://dev.mysql.com/doc/refman/4.1/en/select.html

But remember this won't work if you do an ORDER BY RAND() on each query
(as the information on each page won't be consistent, you will get records
you've already seen reappearing on latter pages).

Cheers,


Andy


--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

 

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

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