This is from the PEAR documentation for the Structures_DataGrid package:
Example 46-3. Bind datagrid to a DB_Result Object with Database paging
<?php
$dg =& new Structures_DataGrid();
$result = $db->query("SELECT * FROM person WHERE hair='red' AND has_glasses=1 LIMIT 20");
// The datagrid will bind the db_result object and show all of the first 20 records
// In order to use paging, you must use a seperate Pager object.
$dg->bind($result);
$dg->render();
?>
I want to use the Pager object to implement paging in conjunction with the DataGrid, but how do you link the two objects together??
Does anyone have a working example of this?
Thanks.