Bug #18374 [Opn->Bgs]: Autoexecute & Autoprepare doesn't work with mysqli
| From: | danielc at analysisandsolutions dot com | Date: | Thu, 25 Oct 2012 20:46:54 +0000 |
| Subject: | Bug #18374 [Opn->Bgs]: Autoexecute & Autoprepare doesn't work with mysqli | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9241@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=18374&edit=1
ID: 18374
Updated by: danielc@analysisandsolutions.com
Reported By: matt at mattgarrett dot org
Summary: Autoexecute & Autoprepare doesn't work with mysqli
-Status: Open
+Status: Bogus
Type: Bug
Package: MDB2_Driver_mysqli
Operating System: Mac/MAMP
PHP Version: 5.3.1
Roadmap Versions:
New Comment:
-Status: Open
+Status: Bogus
The example is just a suggestion, not complete code. I'm guessing you
don't have a table named "user." Change $affectedRows->getMessage() to
$affectedRows->getUserInfo() to get the full details of the error.
Previous Comments:
------------------------------------------------------------------------
[2011-03-21 10:13:52] alec
-Package: MDB2
+Package: MDB2_Driver_mysqli
------------------------------------------------------------------------
[2011-03-18 17:14:24] ldsnerd
Description:
------------
I get an error every time I try and run autoexec or autoprepare against
mysqli in php 5.3.5. It gives me "an unknown error occured" in mdb2.
When I switch it to mysql, the script works flawlessly. This is based
off the sample scripts on your website...the sample scripts do not work.
Test script:
---------------
<?php
// Once you have a valid MDB2 object named $mdb2...
$table_name = 'user';
$fields_values = array(
'name' => 'Fabien',
'country' => 'France'
);
$types = array('text', 'text');
$mdb2->loadModule('Extended');
$affectedRows = $mdb2->extended->autoExecute($table_name,
$fields_values,
MDB2_AUTOQUERY_UPDATE, 'id = '.$mdb2->quote(1,
'integer'), $types);
if (PEAR::isError($affectedRows)) {
die($affectedRows->getMessage());
}
?>
Expected result:
----------------
Successfull insert
Actual result:
--------------
MDB2 Error: unknown error - _execute: [Error message: Unable to execute
statement][Native code: 0]
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=18374&edit=1