Edit report at https://pear.php.net/bugs/bug.php?id=18374&edit=1

ID: 18374
Updated by: danielc@analysisandsolutions.com
Reported By: matt@mattgarrett.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

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:
// Once you have a valid MDB2 object named $mdb2...
$table_name = 'user';

$fields_values = array(
'name' => 'Fabien',
'country' => 'France'
$types = array('text', 'text');

$affectedRows = $mdb2->extended->autoExecute($table_name,
MDB2_AUTOQUERY_UPDATE, 'id = '.$mdb2->quote(1,
'integer'), $types);

if (PEAR::isError($affectedRows)) {

Expected result:
Successfull insert

Actual result:
MDB2 Error: unknown error - _execute: [Error message: Unable to execute
statement][Native code: 0]


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
postedOct 25, '12 at 8:46p
activeOct 25, '12 at 8:46p

1 user in discussion

Danielc: 1 post



site design / logo © 2022 Grokbase