You are here: Re: displaying thousands and thousands of records via PHP/HTML « PHP Programming Language « IT news, forums, messages
Re: displaying thousands and thousands of records via PHP/HTML

Posted by comp.lang.php on 03/14/06 01:46

Richard Levasseur wrote:
> I had to make something very similar for a mailing list, ~5000 records.
> Store the query information (not the data/result set) in session, this
> mean the start/count for the LIMIT clause
>
> What i would do is use get requests to specify the offset
> ?start=10&number=100
> or just hide the start/number by doing ?page=5, and do the calculation
> for offset/count in the php
> ?start=all to show all records
>
> processing that much is going to be slow and may bog the browser down.
> It may be better to send a csv file so they can view it in excel,
> instead.
>
> If you're dealing with large results sets, I'm willing to bet PHP will
> bog down (if you're storing it all into an array or something) before
> the database server begins to bog down.

Ok it took a bit of effort and guesswork but I was able to upgrade my
existing Pagination class methodology to allow for the optional
limitation of the query by adding an additional field

SELECT id, first_name, last_name, (SELECT count(id) FROM people) AS
total FROM people GROUP BY id, first_name, last_name, total ORDER BY
upper(last_name) ASC, upper(first_name) ASC LIMIT 0, 10

What I have to do is to look for the instance in the resultset for
$result[0]->pagination_total and if found, bypass the $_SESSION
handling altogether.

Thanx all!

Phil

 

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

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