In relation to PHP programming language, MySQL is the old database driver, and MySQLi is the Improved driver. MySQLi takes advantage of the newer features of MySQL 5. Lifted verbatim from the php.net site:
- Object-oriented interface
- Support for Prepared Statements
- Support for Multiple Statements
- Support for Transactions
- Enhanced debugging capabilities
- Embedded server support
You have the choice of using mysql, mysqli, or PDO essentially.
If you're simply looking for a relational database, you need look no further than MySQL, though there are many options available. You can use DBD, Postgres, MySQL, MSSQL, sqlite, etc etc etc...
HTH
Source(s):
mysqli的用法:
$mysqli = new mysqli('localhost', 'my_user', 'my_password', 'my_db');
mysql的用法:
$link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password');
在处理中文乱码问题的时候,我是在$link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password');之后设置连接字符集:
mysql_query("set names utf8");【注】:不能写成utf-8
然后再设置所操作的数据库:
mysql_select_db("my_db");