O'Reilly logo

Sams Teach Yourself PHP, MySQL® and Apache All in One, Fifth Edition by Julie Meloni

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

Chapter 18. Interacting with MySQL Using PHP

In this chapter, you learn the following:

How to connect to MySQL using PHP

How to insert and select data through PHP scripts

Now that you have learned the basics of PHP and the basics of working with MySQL, you are ready to make the two interact. Think of PHP as a conduit to MySQL: The commands you learned in the previous chapter are the same commands that you send to MySQL in this chapter, only this time you send them with PHP.

MySQL or MySQLi Functions?

If you are returning to PHP from working with it years earlier, or have worked with current versions of PHP but with very old versions of MySQL, you might have used the mysql_* family of functions. You might also find code examples all over ...

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