What is PHP's MySQL Extension?

   This is the original extension designed to allow you to develop PHP    applications that interact with a MySQL database. The    mysql extension provides a procedural interface    and is intended for use only with MySQL versions older than 4.1.3.    This extension can be used with versions of MySQL 4.1.3 or newer,    but not all of the latest MySQL server features will be available.  

Note:    

     If you are using MySQL versions 4.1.3 or later it is      strongly recommended that you use the      mysqli extension instead.    


   The mysql extension source code is located in the    PHP extension directory ext/mysql.  

   For further information on the mysql extension,    see Mysql.  

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        

  •          Embedded server support        


Note:    

     If you are using MySQL versions 4.1.3 or later it is      strongly recommended that you use this      extension.    


   As well as the object-oriented interface the extension also provides    a procedural interface.  

   The mysqli extension is built using the PHP    extension framework, its source code is located in the directory    ext/mysqli.  

   For further information on the mysqli extension,    see Mysqli.