par
ferv21 » 25 janv. 2011, 23:23
Bonjour
J'utilise Pear afin de comprendre le fonctionnement de ce framework, j'essaye d'utilise le package Structures_DataGrid afin d'afficher un datagrid, le code à l'aide d'être bon, en revanche il n'y a rien qui s'affiche sur ma page.
Voici le code:
<?php
set_include_path(get_include_path() . ";c:\wamp\bin\php\php5.3.5\PEAR" );
require_once 'DB.php';
require_once 'Structures/DataGrid.php';
$options = array('dsn' => 'mysql://root:@localhost/mysql');
$db =& DB::connect('mysql://root:@localhost/mysql');
if(DB::isError($db)){
die($db->getMessage());
}
$datagrid1 = new Structures_DataGrid();
$test = $datagrid1->bind('SELECT * FROM help_category',$options);
if (DB::isError($test)) {
echo $test->getMessage();
}
$datagrid1->render();
?>
voila est ce que j'ai oublier d'installer un autre package?
Cordialement
Bonjour
J'utilise Pear afin de comprendre le fonctionnement de ce framework, j'essaye d'utilise le package Structures_DataGrid afin d'afficher un datagrid, le code à l'aide d'être bon, en revanche il n'y a rien qui s'affiche sur ma page.
Voici le code:
[php]<?php
set_include_path(get_include_path() . ";c:\wamp\bin\php\php5.3.5\PEAR" );
require_once 'DB.php';
require_once 'Structures/DataGrid.php';
$options = array('dsn' => 'mysql://root:@localhost/mysql');
$db =& DB::connect('mysql://root:@localhost/mysql');
if(DB::isError($db)){
die($db->getMessage());
}
$datagrid1 = new Structures_DataGrid();
$test = $datagrid1->bind('SELECT * FROM help_category',$options);
if (DB::isError($test)) {
echo $test->getMessage();
}
$datagrid1->render();
?>[/php]
voila est ce que j'ai oublier d'installer un autre package?
Cordialement