The Process






The Process

The basic steps of performing a query, whether using the mysql command-line tool or PHP, are the same:

  • Connect to the database.

  • Select the database to use.

  • Build a SELECT statement.

  • Perform the query.

  • Display the results.

We'll walk through each of these steps for both plain PHP and PEAR functions.

Resources

When connecting to a MySQL database, you will use two new resources. The first is the link identifier that holds all of the information necessary to connect to the database for an active connection. The other resource is the results resource. It contains all information required to retrieve results from an active database query's result set. You'll be creating and assigning both resources in this chapter.



 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows