What are the advantages of using MySQLi over MySQL?
Asked
Active
Viewed 2.5k times
23
-
1You should consider PDO instead, since the plan is to "make PDO the primary supported DB interface". http://wiki.php.net/summits/pdmnotesmay09 – GZipp Oct 15 '09 at 10:21
1 Answers
32
See the docs:
What is PHP's mysqli Extension?
The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The mysqli extension is included with PHP versions 5 and later.
The mysqli extension has a number of benefits, the key enhancements over the mysql extension being:
- Object-oriented interface
- Support for Prepared Statements
- Support for Multiple Statements
- Support for Transactions
- Enhanced debugging capabilities

Dharman
- 30,962
- 25
- 85
- 135

Dominic Rodger
- 97,747
- 36
- 197
- 212
-
8You're playing with fire if you're not using prepared statements, you only need to get hacked a couple of times to realize that! – Ali Jul 23 '09 at 12:38
-
18
-
@Dominic, what do you mean by support for transactions? We can do transactions with basic mysql too right? – Pacerier Jul 16 '13 at 16:02