--- On Thu, 1/8/09, Fred Silsbee <fredsilsbee@xxxxxxxxx> wrote: > From: Fred Silsbee <fredsilsbee@xxxxxxxxx> > Subject: how does one bind a gui representation and a container object. > To: php-db@xxxxxxxxxxxxx, php-general@xxxxxxxxxxxxx > Date: Thursday, January 8, 2009, 10:41 PM > I have a Qt 4.4 C++ SQL offline program that displays an SQL > table. > > When I change a row-column cell, the change is instantly > reflected in the database. Under Qt 4.4 I use: > > QSqlTableModel > > How does one do this in PHP for online use. > > I've done this under C#.NET VS2008 using > "binding" between a gui representation and the > container object. error I get under Firefox 3.0.5 under Fedora 9 PHP 5.2.6 Unknown Renderer driver. Please specify an existing driver. Code: <?php require 'Structures/DataGrid.php'; // Instantiate the DataGrid $datagrid =& new Structures_DataGrid(); // Setup your database connection $options = array('dsn' => 'mysql://landon4:pwpwpwpwpw@localhost/landonx'); // Bind a basic SQL statement as datasource $test = $datagrid->bind('SELECT * FROM log_book', $options); // Print binding error if any if (PEAR::isError($test)) { echo $test->getMessage(); } // Print the DataGrid with the default renderer (HTML Table) $test = $datagrid->render(Structures_DataGrid_Renderer_HTMLTable); // Print rendering error if any if (PEAR::isError($test)) { echo $test->getMessage(); } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php