Summary

In this hour, you covered some of the basics of storing and retrieving information using SQL.

You learned how to connect to a MySQL database with mysql_connect() or mysql_pconnect().

You learned how make SQL queries using mysql_query() and how to access data using the result resource this function returns.

You also found out how to use the SQLite functions to store and retrieve data. In particular, you learned how to open databases with sqlite_open(), make queries with sqlite_query(), and fetch data with sqlite_fetch_array().

Finally, you learned about the PEAR::DB package. You learned how to use a DSN with the DB::connect() method to make a connection to a database. You also learned how to make SQL queries with the DB_common::query() ...

Get Sams Teach Yourself PHP in 24 Hours, Third Edition 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.