cvs: peardoc /en/package/structures/structures-datagrid example-simple.xml

From: Date: Fri, 10 Dec 2004 17:41:04 +0000
Subject: cvs: peardoc /en/package/structures/structures-datagrid example-simple.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5259@lists.php.net to get a copy of this message
asnagy Fri Dec 10 12:41:04 2004 EDT Modified files: /peardoc/en/package/structures/structures-datagrid example-simple.xml Log: Changed bindDataMethod example to mimic first example http://cvs.php.net/diff.php/peardoc/en/package/structures/structures-datagrid/example-simple.xml?r1=1.6&r2=1.7&ty=u Index: peardoc/en/package/structures/structures-datagrid/example-simple.xml diff -u peardoc/en/package/structures/structures-datagrid/example-simple.xml:1.6 peardoc/en/package/structures/structures-datagrid/example-simple.xml:1.7 --- peardoc/en/package/structures/structures-datagrid/example-simple.xml:1.6 Thu Dec 9 14:58:59 2004 +++ peardoc/en/package/structures/structures-datagrid/example-simple.xml Fri Dec 10 12:41:04 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="package.structures.structures-datagrid.example-simple"> <refnamediv> @@ -53,11 +53,10 @@ $dg = new Structures_DataGrid(); // Get my data -$person = new Person_DataObject; -$person->hair = 'red'; +$result = $db->query('SELECT * FROM users'); // Bind to DataGrid -$data = Structures_DataGrid_DataSource::create($person); +$data = Structures_DataGrid_DataSource::create($result); $dg->bindDataSource($data); // Print the DataGrid

« previous php.pear.doc (#5259) next »