O'Reilly logo

Managing & Using MySQL, 2nd Edition by Hugh E. Williams, Randy Yarger, George Reese, Tim King

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

Data Types

The following PHP data types are specialized types for database access:

cresource

A connection resource handle. An integer returned from the functions mysql_connect( ) , and mysql_pconnect( ) . Both functions are used to establish a connection to a MySQL DBMS, and are described later in this chapter. The connection resource handle is used as a parameter to several functions (such as mysql_select_db( ) , mysql_query( ), and mysql_affected_rows( ) ) to determine or change aspects of the connection.

qresource

A query resource handle. An integer returned from functions such as mysql_query() , mysql_list_fields() , mysql_list_dbs() , and mysql_unbuffered_query() . These functions are used to execute a query through a connection resource handle, and are described later in this chapter. A query resource handle is used as a parameter to several functions (such as mysql_fetch_array() , mysql_tablename() , and mysql_num_rows() ) to retrieve a query’s output or information about the query.

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