Using the mysqli API

To check whether your version of PHP includes mysqli support, run the phpinfo() command and look for a section headed MySQLi Support.

MySQLi Support

At compile time, MySQLi support is enabled by using the --with-mysqli configure switch. You might need to supply the path to the mysql_config utility, as in --with-mysqi=/usr/bin/mysql_config.

The MySQLi API can be used both procedurally and in an object-oriented manner. The procedural interface is very similar to the classic mysql API—for instance, it uses functions such as mysqli_query() and mysqli_fetch_row(). Therefore, in this section, you learn how to use MySQLi with objects. ...

Get Sams Teach Yourself MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.