RE: [PEAR] autoexecute and mdb2
| From: | Mark Steudel | Date: | Tue, 25 Jul 2006 16:15:36 +0000 |
| Subject: | RE: [PEAR] autoexecute and mdb2 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-24758@lists.php.net to get a copy of this message | ||
Thanks, I've been working on a php5 box which allows for just
db->autoexecute, and forgot that I was working on php 4 box, and
switched it to the below syntax as you pointed out.
Thanks, Mark
-----Original Message-----
From: Justin Patrin [mailto:papercrane@gmail.com]
Sent: Tuesday, July 25, 2006 8:46 AM
To: Mark Steudel
Cc: pear-general@lists.php.net
Subject: Re: [PEAR] autoexecute and mdb2
On 7/25/06, Mark Steudel <mark@netriver.net> wrote:
> I'm getting the following error:
>
> Fatal error: Call to undefined function: autoexecute()
>
> I'm running
> MDB2 2.2.0
> MDB2_Driver_mysql 1.2.0
>
> Here's is my code.
>
> $dsn = array(
> 'phptype' => 'mysql',
> 'username' => DB_USER,
> 'password' => DB_PASS,
> 'hostspec' => DB_HOST,
> 'database' => DB_NAME,
> );
>
> $this->db =& MDB2::connect($dsn);
>
> if (PEAR::isError($db)) {
> die($this->db->getMessage());
> }
>
> $this->db->setFetchMode(MDB2_FETCHMODE_ASSOC);
> $this->db->loadModule('Extended');
>
> $field_values['name'] = 'test';
>
> $sth =& $this->db->autoExecute( 'tblsplashpages', $field_values );
>
$this->db->loadExtension('Extended');
$this->db->extended->autoExecute(...);
or similar.
--
Justin Patrin