Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-05-2008, 02:00 AM
Junior Member
 
Join Date: Sep 2008
Posts: 2
Default Taking snapshots of the DB for "Next 10 entries", "Prev 10 entries" buttons

Hello all,

I am currently querying my entire database and returning to the user about 1000 rows of data. Unfortunately, this can take a very long time. To solve this problem, I've decided to immitate the functionality at the bottom of Google search results pages, where it has "Next", "Prev" and then a count from 1 to some number.

I've look at Zend_Db_Select::limit so that I could provide a count, and an offset, but unfortunately the database I am querying can have inserts at the same time I am reading for the database, so it seems probable that if the user decides to visit the Next 10 entries, the data will be messed up because there were inserts into the database at the same time...

I hope this makes sense... any help would be great.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-24-2008, 01:58 PM
Junior Member
 
Join Date: Sep 2008
Posts: 3
Default

Hi,

Have you checked out the Zend Framework paginator component? This is likely the best way to go as it will eliminate the need for you to manually manage select limits.

See the Zend_Paginator section.

Hope this helps,
Jason
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:21 PM.