mysqli.dll是php对mysql新特性的一个扩展支持。在php5中可以在php.ini中加载,如下图:
498)this.width=498; onmousewheel=javascript:return big(this) alt=\ hspace=0 src=http://www.phpe.net/uploads/images/article_i_6235.gif align=baseline border=0>
, interface, ingenious, incompatible or incomplete(改扩展仍在开发中,因为mysql4。1和mysql5都没有正式推出尚在开发中,新的特性没有完全实现)
mysqli想实现的目标具体有:
-更简单的维护
-更好的兼容性
-向后兼容
mysql(指php中的模块)发展到现在显得比较凌乱,有必要重新做下整理。同时,有必要跟上mysql(dbms)的发展步伐,加入新的特性的支持,以及适应mysql(dbms)以后的版本。所以诞生了mysqli.dll
mysqli.dll的特性:
-可以和mysql.dll一样的方式使用
-支持oo接口,简简单单调用
-支持mysql4。1引入的新特性
-通过mysqli_init() 等相关函数,可以设置高级连接选项
mysqli的使用例子:
1.和以前mysql.dll一样的方法:
输出结果:
very large cities are:
mumbai (bombay) (10500000)
seoul (9981619)
são paulo (9968485)
shanghai (9696300)
jakarta (9604900)
2.使用内置oo接口方式调用:
query('select name, population from city order by population desc limit 5')) {
print(very large cities are:n);
/* fetch the results of the query */
while( $row = $result->fetch_assoc() ){
printf(%s (%s)n, $row['name'], $row['population']);
}
/* destroy the result set and free the memory used for it */
$result->close();
}
/* close the connection */
$mysqli->close();
?>
支持的新特性还有:bound parameters,bound results等。
有兴趣的可以直接去参看原英文:
http://www.bkjia.com/phpjc/446885.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/446885.htmltecharticle在新下载的php5中你会发现多了一个mysqli.dll,它是干什么用的呢?我简单介绍下: mysqli.dll是php对mysql新特性的一个扩展支持。在php5中可以在...
