Reply to Complicated pagination logic problem

Your name:

Reply:


Posted by comp.lang.php on 10/11/98 11:59

'll try to explain this as clearly as possible, sorry if it's unclear.

You have in your directory /foo 42 images

You have in your database metadata for 30 out of those 42 images

You have to display all 42 images in the /foo directory whether they
have database metadata or not.

If any of the 42 images have metadata, you must display the metadata,
else, you don't.

With me so far? Good, it gets wild from here.

You have a requirement for pagination.

Your pagination limit is to only show 20 images at a time.

The only way I know how to do this is to get all of the images out of
the filesystem pertaining to /foo, all of the metadata out of the
database pertaining to /foo, and logically combine them (using
array_merge()) into a single resultset and display, metadata or not.

However, to paginate to the next page, you'll have to have had stuffed
THE ENTIRE RESULTSET into a $_SESSION variable and splice that.

That of course is not good. But what on earth else do I do? If I am not
to use $_SESSION, how would I paginate such an exotic resultset?

Thanx
Phil

[Back to original 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

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