![Picture of Omar Abdallah Picture of Omar Abdallah](/graphics/unknown.gif)
Omar Abdallah - 2009-11-06 11:39:29 -
In reply to message 1 from cuma elp
You will put it on both pages. testpage.php and sub_page.php
but you will have to cascade the column names in the search fields($fields property on the object)
here is a sample of its implementation:
Let's say we have categories for customer a table called 'category' with fields 'category_id' and 'category_name' and you'll have to add a foreign key in the customer's table:
the query will be like that:
$query = "SELECT cust.id, cust.name, cat.category_name FROM customers AS cust
LEFT JOIN category AS cat ON (cust.category_id = cat.category_id)";
to cascade it into the search fields(columns)
you will specify the fields with the table prefix:
$paginator->fields = 'cust.name';
or if you want to enable the search for the category name also(or any multiple fields) you will make it an array of fields as the following:
$paginator->fields = array('cust.name','cat.category_name');
That's all
Thank you for your rating, and if you need anything don't hesitate to ask about it.