tags:

views:

22

answers:

1

I had found a pagination code on paging entries using PHP and MySQL.....(which I downloaded in here)i found out that it was designed for a single table only.....Now my problem is how about paging a "mulitple queried table (2 or more tables temporarily combined). My idea is to make a derived table out from it, but, still failed, maybe i've done it wrong so can someone try to help me figure out the answer? Or what should be my proper query?

+1  A: 

Just replace the SQL in pagination.php to reflect your joined tables.

Basically all that script does is check whether there are more rows after the rows already output, then show a link to increase the limit.

You can write your own just as easily:

Do a select count() of your joined tables to find the total number, then a while loop to find all rows, using a LIMIT $from, 10 to return only 10 rows.

If $from is still less than the total count, display your Next Page links...

MQA