PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 6th, 2006, 02:23 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
How to: Pagination with PEAR::DB

Hi,
I'm trying to make a search page which will find some data from a db. But I can't get all the data to one page. So I should make a pagination. I'm using pear's DB, and I'm a little confused with it's functions. Is there a tutorial or a documentation that I can read about this? Or a better alternative can you explain me ?

And by the way should I pass to pear's MDB2 from DB? And is there is simple tutorial for that one too?

Thank you for your time.

Reply With Quote
  #2  
Old June 6th, 2006, 03:29 PM
drinehart drinehart is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 20 drinehart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: How to: Pagination with PEAR::DB

There is a tutorial on how to paginate using PEAR:B and some help if you search the forums. (but you will need to use the LIMIT statement in your SQL syntax to accomplish this)

I believe PEAR::MDB2 allows for retrieving all the rows at once and then diplaying the number of rows you wish at a time. (Note: you will still need to use php if you wish to alternate row colors)

See example 33-4 on the PEAR:MDB2 website for syntax. I would like to see a tutorial on MDB2 if someone has the time to write one.

I suppose if you're starting from scratch you should choose PEAR::MDB2 since PEAR:B is no longer being developed (no new features, just bug/security fixes).

Duane

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > How to: Pagination with PEAR::DB


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway