Pagination for multiple criteria search

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lala
Forum Commoner
Posts: 27
Joined: Mon Jul 26, 2010 7:56 pm

Pagination for multiple criteria search

Post by lala »

Is there any samples code for pagination for multiple criteria search?
For example, allow 20records displayed in 1page, then next 20records in second page.
Anyone can help me? Thanks :bow:
Last edited by lala on Sat Mar 26, 2011 8:30 am, edited 1 time in total.
divedj
Forum Commoner
Posts: 47
Joined: Wed Dec 29, 2010 4:32 am
Location: Malta

Re: Page Split for Table

Post by divedj »

Search for "php mysql pagination tutorial" on google. There are lots of good ready made tutorials with good code explanations found already on the first search results.
lala
Forum Commoner
Posts: 27
Joined: Mon Jul 26, 2010 7:56 pm

Re: Page Split for Table

Post by lala »

divedj wrote:Search for "php mysql pagination tutorial" on google. There are lots of good ready made tutorials with good code explanations found already on the first search results.
Yea, I did search it.. I have some problem in displaying join table record... It can calculate how many page but cant show the result out.. I dont know what is the problem yet
litebearer
Forum Contributor
Posts: 194
Joined: Sat Mar 27, 2004 5:54 am

Re: Page Split for Table

Post by litebearer »

Its easier for people to help if you show your code and describe the problem/errors you are experiencing
lala
Forum Commoner
Posts: 27
Joined: Mon Jul 26, 2010 7:56 pm

Re: Page Split for Table

Post by lala »

Is it possible to do pagination for multiple criteria search table?
litebearer
Forum Contributor
Posts: 194
Joined: Sat Mar 27, 2004 5:54 am

Re: Pagination for multiple criteria search

Post by litebearer »

pagination handles the results of a query. It is the design of your query that is the real issue. Try combining the query into one
ie where (field01 like needle01 AND field02 LIKE needle02) OR field02 LIKE needle01
lala
Forum Commoner
Posts: 27
Joined: Mon Jul 26, 2010 7:56 pm

Re: Pagination for multiple criteria search

Post by lala »

litebearer wrote:pagination handles the results of a query. It is the design of your query that is the real issue. Try combining the query into one
ie where (field01 like needle01 AND field02 LIKE needle02) OR field02 LIKE needle01
hi litebearer,
I can do pagination for static query and query for multiple search query separately.. But I fail to combine both of it because what pagination that I did is call from other pages. Do u hv any sample dat show the both of its function. Thanks :)
litebearer
Forum Contributor
Posts: 194
Joined: Sat Mar 27, 2004 5:54 am

Re: Pagination for multiple criteria search

Post by litebearer »

Please show us what you have tried thus far.
Post Reply