ZF-2097: Provide unit tests for using bound parameters with stored procedures

Issue Type: Unit Tests: Improvement Created: 2007-10-24T14:44:18.000+0000 Last Updated: 2012-11-20T20:53:10.000+0000 Status: Closed Fix version(s): - Next Major Release ()

Reporter: Darby Felton (darby) Assignee: None Tags: - Zend_Db

  • Zend_Db_Adapter_Mysqli

Related issues: - ZF-348



Patrick Calkins wrote:

{quote} Code:

<pre class="highlight">
$db = Zend_Db::factory('Mysqli', array(
    'host'     => '',
    'username' => 'webuser',
    'password' => 'xxxxxxxx',
    'dbname'   => 'test'

$userName = 'jo';
$password = 'xyzzy';

$stmt = $db->prepare('CALL authenticate_user(?, ?)');
$stmt->bindParam(1, $userName);
$stmt->bindParam(2, $password);
$result = $stmt->fetch();

The bindParam statements call _bindParam in Zend/Db/Statement/Mysqli.php, which have nothing more than a 'return true;' statement. It does not appear the Mysqli bind_param function is implemented - is this correct?? If so does anyone have any workarounds for using stored procedures in MySql 5.1??

Using the PDO_MYSQL driver does not help as it has a problem calling 2 stored procedures back-to-back (throws the 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active.' error, which has been discussed before)... {quote}

Zend_Db_Statement_MysqliTest tests bound parameters with regular queries but not with stored procedures.

Also check to see where else these tests should appear.


Posted by Wil Sinclair (wil) on 2008-03-21T17:05:34.000+0000

This issue should have been fixed for the 1.5 release.

Posted by Wil Sinclair (wil) on 2008-03-25T20:43:53.000+0000

Please categorize/fix as needed.

Posted by Wil Sinclair (wil) on 2008-04-18T13:12:04.000+0000

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Posted by Simon Mundy (peptolab) on 2008-05-26T23:25:48.000+0000

There appears to be major issues with the Mysqli adapter - the Pdo_Mysql has been resolved. Leaving open until next major version to see if any core PHP issues are related to this.

Posted by Wil Sinclair (wil) on 2008-12-04T12:53:17.000+0000

Reassigning as Ralph is the maintainer of Zend_Db

Posted by Ralph Schindler (ralph) on 2009-01-10T10:17:30.000+0000

Will evaluate within 2 weeks

Posted by emerald007 emerald007 (emerald007) on 2009-09-22T05:32:54.000+0000

Hi - i'm wondering has their been any update on this issue?

Posted by Rob Allen (rob) on 2012-11-20T20:53:10.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.