Structure Data Grid Using PDO
| From: | Ajitabh Kishore | Date: | Wed, 25 Feb 2009 06:15:59 +0000 |
| Subject: | Structure Data Grid Using PDO | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-51556@lists.php.net to get a copy of this message | ||
Hi,
I am looking for a sample code or example or documentation on how to use
Structure Data Grid with PDO and populate data into smarty template.
Any help or reference will be highly appreciated.
I have DataSource/PDO.php installed. Below is my code.
$ds_options = array('mysql:host=localhost;dbname=prototype', 'root',
'');
$foogrid =& new Structures_DataGrid(5);
$sql = "SELECT * FROM foo";
$test = $foogrid->bind($sql, $dsn, 'PDO');
if (PEAR::isError($test)) {
echo "DRIVER ERROR = ".$test->getMessage();
}
I am getting this error
DRIVER ERROR = No Database object or dsn string specified
Thank You,
AK