how does one bind a gui representation and a container object.

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
Fred Silsbee [ Do, 08 Januar 2009 23:41 ] [ ID #1983888 ]

Re: how does one bind a gui representation and a container object.

--- On Thu, 1/8/09, Fred Silsbee <fredsilsbee [at] yahoo.com> wrote:

> From: Fred Silsbee <fredsilsbee [at] yahoo.com>
> Subject: how does one bind a gui representation and a container object.
> To: php-db [at] lists.php.net, php-general [at] 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:
<?php
require 'Structures/DataGrid.php';

// Instantiate the DataGrid
$datagrid =& new Structures_DataGrid();

// Setup your database connection
$options = array('dsn' => 'mysql://landon4:pwpwpwpwpw [at] 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
Fred Silsbee [ Fr, 09 Januar 2009 00:12 ] [ ID #1983889 ]
PHP » gmane.comp.php.database » how does one bind a gui representation and a container object.

Vorheriges Thema: help me JOIN 3 tables.
Nächstes Thema: SOLVED data from db to a page and then to another page