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( ), andmysql_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 asmysql_select_db( ),mysql_query( ), andmysql_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(), andmysql_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 asmysql_fetch_array(),mysql_tablename(), andmysql_num_rows()) to retrieve a query’s output or information about the query.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access