Datagrid and DataObject and performance

From: Date: Mon, 13 Dec 2004 15:49:49 +0000
Subject: Datagrid and DataObject and performance
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16198@lists.php.net to get a copy of this message
Hello Again, After look at the examples just find to be allot easier to just bind the data and let DataGrid do the work however I have this code and it does not work: $obj_db = DB_DataObject::factory('acesso'); $obj_db->find(); $dg = new Structures_DataGrid(4); $dg->bind($obj_db); $dg->render(); But if I transform the DataObject to array it works fine. $obj_db = DB_DataObject::factory('acesso'); $obj_db->find(); while ($obj_db->fetch()) { $arr[] = $obj_db->toArray(); } $dg = new Structures_DataGrid(4); $dg->bind($arr); $dg->render(); Would be nice to direct bind the DataObject to the data grid but I have no problem transforming DataObject into array but one question remains : Is this a great performance hit? Ângelo

« previous php.pear.general (#16198) next »