曾经也取不到,改成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();
}
}
解决方案 »
- php有没有一些关于数组处理的包装类(或库)?
- 关于表但提交问题!
- PHP新手学习求助。。。
- 我对move_uploaded_file是相当的无语
- 终于可以访问了
- 急啊!!!关于生僻汉字显示问号的问题(200分)
- phpMyAdmin如何让一张表里面的数字等于另外一张表中三个数字相加的总和并且可以动态更新?
- Fatal error: Cannot re-assign $this in D:\php\function.php on line 40 这个解决方法,知道的请进
- php无法连接远程的MYSQL?救急!!!!
- 一个select查询,急急急+++++++++跪请大侠帮手
- 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. 目录
决定不用了