public function query($str) {
if(0===stripos($str, 'call')){ // 存储过程查询支持
$this->close();
}
$this->initConnect(false);
if ( !$this->_li
$this->queryStr = $str;
//释放前次的查询结果
if ( $this->queryID ) { $this->free(); }
N('db_query',1);
// 记录开始执行时间
G('queryStartTime');
$this->queryID = mysql_query($str, $this->_li
$this->debug();
if ( false === $this->queryID ) {
$this->error();
return false;
} else {
$this->numRows = mysql_num_rows($this->queryID);
return $this->getAll();
}
}
我不明白的是,为什么 判断是存储过程之后,要关闭数据库,然后再重新连接数据库
最佳答案
