Chapter 5: Communicating with the Database from PHP Scripts

In This Chapter

arrow.png Using PHP built-in functions to access MySQL

arrow.png Sending SQL queries to the MySQL server

arrow.png Understanding how to handle MySQL errors

arrow.png Using other helpful functions

arrow.png Changing functions from mysqli to mysql

PHP and MySQL work well together, and this dynamic partnership is what makes PHP and MySQL so attractive for web database application development. Whether you have a database full of information that you want to make available to users (such as a product catalog) or a database waiting to be filled by users (for example, a customer database), PHP and MySQL work together to implement your application.

This chapter describes accessing MySQL from PHP scripts.

Knowing How MySQL and PHP Work Together

You interact with the database by passing messages to the MySQL server. As explained in Chapter 1 of this minibook, the messages are composed in the SQL language, a standard computer language understood by most database management ...

Get PHP, MySQL, JavaScript & HTML5 All-in-One For Dummies 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.