Php 如何使用pear mdb2调试问题原因

Php 如何使用pear mdb2调试问题原因,php,pear,mdb2,Php,Pear,Mdb2,我得到以下错误 MDB2错误:不支持 我不知道到底什么是不被支持的。以上代码是pear在MDB2手册中给出的示例。谁能告诉我我遗漏了什么?谢谢首先,调试哪个die调用正在回显消息: <?php include("PEAR/MDB2.php"); $dsn = 'mysqli://root@localhost/heart_hugger'; $options = array( 'debug' => 2, 'result_buffering' => f

我得到以下错误

MDB2错误:不支持


我不知道到底什么是不被支持的。以上代码是pear在MDB2手册中给出的示例。谁能告诉我我遗漏了什么?谢谢

首先,调试哪个die调用正在回显消息:

<?php

 include("PEAR/MDB2.php");
      $dsn = 'mysqli://root@localhost/heart_hugger';
$options = array(
    'debug' => 2,
    'result_buffering' => false,
);

$mdb2 =& MDB2::singleton($dsn, $options);
if (PEAR::isError($mdb2)) {
    die($mdb2->getMessage());
}


$table_name = 'cms';

// if left as a non array all fields of the table will be fetched using '*'
// in that case this variable can be set to true, to autodiscover the types
$result_types = "";

$mdb2->loadModule('Extended');
$res = $mdb2->extended->autoExecute($table_name, null,
                        MDB2_AUTOQUERY_SELECT, 'cmsId = '.$mdb2->quote(1, 'integer'),
                        null, true, $table_name);

if (PEAR::isError($res)) {
    die($res->getMessage());
}

$row = $res->fetchRow();
echo "value from fetchrow = ".$row[2];


$mdb2->disconnect();
?>
然后,检查扩展用户信息:

die('first: ' . $res->getMessage());

这应该给你一个关于真正问题的提示。

哪个
die()
调用给出了不支持的错误?另外,
$res->getUserInfo()
告诉您什么?感谢您的回复,我正在本地主机上运行它,只有用户root。您能告诉我如何检查哪个die()调用吗?MDB2错误:不支持的checkResultTypes:[错误消息:0的cms不是受支持的列类型][上次执行的查询:从cms中选择*其中cmsId=1][本机代码:0]这是我得到的MDB2错误:不支持checkResultTypes:[错误消息:0的cms不是受支持的列类型][上次执行的查询:从cms中选择*其中cmsId=1][本机代码:0]似乎“autoExecute”参数与API所说的不匹配。请检查,谢谢我已经修复了它。文档是抽象的,有些人需要继承它们并提供更多详细信息……谢谢@cweiske。
die($res->getMessage() . "\n" . $res->getUserInfo());