23

What are the advantages of using MySQLi over MySQL?

Dominic Rodger
  • 97,747
  • 36
  • 197
  • 212
Ben Shelock
  • 20,154
  • 26
  • 92
  • 125
  • 1
    You 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 Answers1

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