O'Reilly logo

Sams Teach Yourself MySQL by Chris Newman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 24. Using MySQL with PHP

In this lesson, you learn how to communicate with a MySQL database from a PHP script.

PHP actually has two different APIs for MySQL, both of which are covered in this chapter. The first, mysql, is the classic set of functions that are available in all versions of PHP.

The new interface is mysqli, which stands for MySQL Improved. It is available only in PHP version 5 and works only with MySQL version 4.1 and higher. The mysqli interface can be used through a set of functions or in an object-oriented manner, to fit the improved OO capabilities of PHP 5.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required