所以我尝试更改所有MySQL查询以使用PDO ..
更改后,我有一些像这样的错误..当试图在file.php中添加一个新的注释时,烦人的是注释被添加但是这个错误也来了..
Warning: pdo_dummy::rowCount() Your last query was unsuccessful and returned FALSE
instead of a fetchable result. See pdo_error() to find out why. - caused by /home/user
/public_html/file.php, line 118, when calling pdo_affected_rows(); in /home/user
/public_html/includes/pdo_mysql.php on line 1068
在file.php的第118行
if (pdo_affected_rows() == 1)
show_error_msg(T_("COMPLETED"), T_("COMMENT_ADDED"), 0);
else
show_error_msg(T_("ERROR"), T_("UNABLE_TO_ADD_COMMENT"), 0);
在pdo_mysql.php的第1068行
function pdo_trigger_error($msg, $level=E_USER_NOTICE) {
// locate source of last pdo_*() invocation
foreach ((debug_backtrace()) as $src) {
// skip any functions in the current file
if (empty($src["file"])) {
$src["file"] = "{main}";
$src["line"] = "-";
}
if ($src["file"] != __FILE__) {
$dir = dirname($src["file"]);
$file = basename($src["file"]);
$msg .= " - caused by $dir/<b>$file</b>, line <b>$src[line]</b>, when calling <a>$src[function]()</a>;";
break;
}
}
// pass on to actual error handler chain
trigger_error($msg, (($level == 1<<14) && (PHP_VERSION < 5.3)) ? E_USER_NOTICE : $level);
}
我认为这个错误是由于冲突而发生但不确定......
trigger_error($msg, (($level == 1<<14) && (PHP_VERSION < 5.3)) ? E_USER_NOTICE : $level);
完整的pdo_mysql.php脚本在这里Using PDO_MySQL 感谢.....