Re: Structure Data Grid Using PDO
| From: | till | Date: | Wed, 25 Feb 2009 17:44:31 +0000 |
| Subject: | Re: Structure Data Grid Using PDO | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51560@lists.php.net to get a copy of this message | ||
On Wed, Feb 25, 2009 at 7:15 AM, Ajitabh Kishore <aji.kiss@gmail.com> wrote:
> 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
I don't see you using $ds_options anywhere?
Till