Difference between mysql & mysqli

Natasha picture Natasha · Jan 4, 2013 · Viewed 85.1k times · Source

Possible Duplicate:
mysql vs mysqli in php

What is the difference between mysql_* functions and mysqli_* functions? Is there any technical reasons behind we shouldn't use mysql_* functions?

Answer

Sankalp Mishra picture Sankalp Mishra · Jan 4, 2013

The "i" stands for "improved". The list of improvements can be found in here.

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 supports some things that the old MySQL extension doesn't. Things like prepared statements, multiple statements, and transactions on top of my head.