Re: Structures_DataGrid installation issues: only returns a blank page

From: Date: Fri, 28 Jan 2005 20:18:17 +0000
Subject: Re: Structures_DataGrid installation issues: only returns a blank page
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17258@lists.php.net to get a copy of this message
Andrew wrote: >You are most not instantiating SDG as a reference: > >$dg =& new Structures_DataGrid(); > >You must use the '&'. > >If you are already doing this, post the code that you are using. Andrew, Thanks for the blazingly fast response. Here's the code: require('Structures/DataGrid.php'); // Get my data $dataset = array(array('id' => 1, 'first_name' => 'Bob', 'last_name' => 'Smith', 'age' => '37'), array('id' => 2, 'first_name' => 'John', 'last_name' => 'Doe', 'age' => '23'), array('id' => 3, 'first_name' => 'Fred', 'last_name' => 'Thompson', 'age' => '58'), array('id' => 4, 'first_name' => 'Sally', 'last_name' => 'Robinson', 'age' => '52'), array('id' => 5, 'first_name' => 'Robert', 'last_name' => 'Brown', 'age' => '19')); // Print the DataGrid $dg =& new Structures_DataGrid(); $dg->bind($dataSet); $dg->render(); Mind you I have tried several different arrays (simple indexed, simple assoc, and multi-dim) , this is just one I found in a post about SDG that filled my immediate need. I have also tried using this to no avail: echo $dg->renderer->getPaging(); The only thing I haven't tried is actually doing a db call and pulling a result set, but I wanted to see how this handled array prior to going deeper with the db. Well, the only thing _I can think of or tell_ that I haven't tried... Thanks -sandro

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