曾经也取不到,改成MYSQLI了。class DB_Mysqli{ var $mysqli;
var $row;
var $count;
var $affected_row_sql;
var $affected_row_sp; //var $next_row; function DB_Mysqli(){ $dbhost = Config::dbhost;
$dbuser = Config::dbuser;
$dbpw = Config::dbpw;
$dbname = Config::dbname; $this->mysqli = new mysqli($dbhost,$dbuser,$dbpw,$dbname);
if (mysqli_connect_errno()){
die("Connect failed:".mysqli_connect_error());
}
$this->row = null;
$this->count = 0;
//$this->next_row = array();
} function call_sql($sql){
$this->mysqli->query($sql);
$this->affected_row_sql = $this->mysqli->affected_rows; } function call_sp($query){
$this->mysqli->multi_query($query);
do {
if ($result = $this->mysqli->use_result()){
while ($row = $result->fetch_row()){
$this->row[$this->count++] = $row;
}
$result->close();
}
} while($this->mysqli->next_result());
$this->affected_row_sp = $this->mysqli->affected_rows; } function close_sp(){
$this->mysqli->close();
}
}
var $row;
var $count;
var $affected_row_sql;
var $affected_row_sp; //var $next_row; function DB_Mysqli(){ $dbhost = Config::dbhost;
$dbuser = Config::dbuser;
$dbpw = Config::dbpw;
$dbname = Config::dbname; $this->mysqli = new mysqli($dbhost,$dbuser,$dbpw,$dbname);
if (mysqli_connect_errno()){
die("Connect failed:".mysqli_connect_error());
}
$this->row = null;
$this->count = 0;
//$this->next_row = array();
} function call_sql($sql){
$this->mysqli->query($sql);
$this->affected_row_sql = $this->mysqli->affected_rows; } function call_sp($query){
$this->mysqli->multi_query($query);
do {
if ($result = $this->mysqli->use_result()){
while ($row = $result->fetch_row()){
$this->row[$this->count++] = $row;
}
$result->close();
}
} while($this->mysqli->next_result());
$this->affected_row_sp = $this->mysqli->affected_rows; } function close_sp(){
$this->mysqli->close();
}
}
解决方案 »
- 真心求解:apache+php+mysql配置问题
- template 循环的数据重复出现怎么解决?
- 添加重复区域后、升序、不用分页
- 急!一个发票校正号的问题,比较复杂,高手请进!
- 最近你们的BLOG是不是都出错呀?我的好郁闷。。晕人。
- 为什么我在utf8编码下不能时候header("Location:main.php")跳转这样的函数
- 寻求php的高手
- 关于PHP函数exec的问题
- COPY()能不能把本地文件COPY到远程的机子上???
- 请问如何象邮箱删除邮件那样,选中多条所要删除的记录,点删除按钮,把相应记录从数据库删除
- file_get_contents的问题????
- 请教php,文件里密码验证问题。
PDO support enabled
PDO drivers mysql
pdo_mysql
PDO Driver for MySQL, client library version 5.0.22
警告
本扩展模块是实验性的。本模块的行为,包括其函数的名称以及其它任何关于此模块的文档可能会在没有通知的情况下随 PHP 以后的发布而改变。使用本扩展模块风险自担。
PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MySQL 3.x and 4.x databases. 目录
决定不用了