Re: MDB2 Extended module in PHP4

From: Date: Thu, 02 Feb 2006 08:39:22 +0000
Subject: Re: MDB2 Extended module in PHP4
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41178@lists.php.net to get a copy of this message
Stoyan Stefanov wrote:
Hi guys, I have this code: $db->loadModule('Extended'); $result = $db->autoExecute(
    'tablename',
    $data,
    MDB2_AUTOQUERY_INSERT
); Works as expected in PHP5, but I get an error in PHP4 (tested 4.4.1-pl1 and 4.4.2). The error is that autoExecute() is not defined. "Fatal error: Call to undefined function: autoexecute() " I just tried echo-ing a line in Extended.php and it was displayed, so Extended.php is included. Should I log this as a bug?
No this is not a bug. PHP4 does not support overloading. Therefore you need to do: $db->loadModule('Extended'); $result = $db->extended->autoExecute(
    'tablename',
    $data,
    MDB2_AUTOQUERY_INSERT
);

« previous php.pear.dev (#41178) next »