php mysql 和 mysqli 的区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14151458/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Difference between mysql & mysqli
提问by Natasha
Possible Duplicate:
mysql vs mysqli in php
可能的重复:
php 中的 mysql 与 mysqli
What is the difference between mysql_* functionsand mysqli_* functions? Is there any technical reasons behind we shouldn't use mysql_* functions?
mysql_* functions和 和有 mysqli_* functions什么区别 ?我们不应该使用它背后是否有任何技术原因mysql_* functions?
回答by Sankalp Mishra
The "i" stands for "improved". The list of improvements can be found in here.
“i”代表“改进”。可以在此处找到改进列表。
MySQLi is the OOP version of MySQL extension. In the end, MySQLi and MySQL accomplish the same thing: they are extension for interacting with MySQL from PHP. A lot of people still use the original MySQL extension instead of the new MySQLi extension because MySQLi requires MySQL 4.1.13+ and PHP 5.0.7+ .
MySQLi 是 MySQL 扩展的 OOP 版本。最后,MySQLi 和 MySQL 完成了同样的事情:它们是从 PHP 与 MySQL 交互的扩展。很多人仍然使用原来的 MySQL 扩展而不是新的 MySQLi 扩展,因为 MySQLi 需要 MySQL 4.1.13+ 和 PHP 5.0.7+ 。
MySQLi supports some things that the old MySQL extension doesn't. Things like prepared statements, multiple statements, and transactions on top of my head.
MySQLi 支持一些旧的 MySQL 扩展不支持的东西。诸如准备好的报表、多个报表和交易之类的事情就在我的脑海中。
回答by Mr Zorn
http://php.net/manual/en/mysqli.overview.phpshould explain all the differences

