PHP MySQLi

suggest change

Versions

mysqli has shipped with PHP since 5.0. The original version list on this page ran through PHP 7.1.

Introduction

The mysqli interface is an improvement (it means "MySQL Improved extension") of the mysql interface, which was deprecated in PHP 5.5 and removed in PHP 7.0. The mysqli extension was developed to take advantage of new features found in MySQL 4.1.3 and newer. It is included with PHP 5 and later.

Remarks

Features

The mysqli interface has a number of benefits, the key enhancements over the mysql extension being:

It features a dual interface: the older, procedural style and a new, object-oriented programming (OOP) style. The deprecated mysql had only a procedural interface, so the object-oriented style is often preferred. However, the new style is also favorable because of the power of OOP.

Alternatives

An alternative to the mysqli interface is PHP Data Objects (PDO). PDO is object-oriented only and can talk to more database systems than MySQL.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents