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

ID: 18374
Updated by: alec@alec.pl
Reported By: matt at mattgarrett dot org
Summary: Autoexecute & Autoprepare doesn't work with mysqli
Status: Open
Type: Bug
-Package: MDB2
+Package: MDB2_Driver_mysqli
Operating System: Mac/MAMP
Package Version: 2.4.1
PHP Version: 5.3.1
Roadmap Versions:
New Comment:

-Package: MDB2
+Package: MDB2_Driver_mysqli



Previous Comments:
------------------------------------------------------------------------

[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]

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 21, '11 at 9:11a
activeMar 21, '11 at 9:11a
posts1
users1
websitepear.php.net

1 user in discussion

Alec: 1 post

People

Translate

site design / logo © 2021 Grokbase