how does one bind a gui representation and a container object.
am 08.01.2009 23:41:32 von Fred Silsbee
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: how does one bind a gui representation and a container object.
am 09.01.2009 00:12:18 von Fred Silsbee
--- On Thu, 1/8/09, Fred Silsbee wrote:
> From: Fred Silsbee
> Subject: how does one bind a gui representation and a container object.
> To: php-db@lists.php.net, php-general@lists.php.net
> 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:
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