Oracle 5.0 Reference Manual page 2261

Table of Contents

Advertisement

Version
20.7.2.3. Predefined Constants
Copyright 1997-2012 the PHP Documentation Group. [2230]
The constants below are defined by this extension, and will only be available when the extension has
either been compiled into PHP or dynamically loaded at runtime.
Since PHP 4.3.0 it is possible to specify additional client flags for the
mysql_pconnect
Table 20.34. MySQL client constants
Constant
MYSQL_CLIENT_COMPRESS
MYSQL_CLIENT_IGNORE_SPACE
MYSQL_CLIENT_INTERACTIVE
MYSQL_CLIENT_SSL
The function
following constants are defined:
Table 20.35. MySQL fetch constants
Constant
MYSQL_ASSOC
MYSQL_BOTH
MYSQL_NUM
20.7.2.4. Examples
Copyright 1997-2012 the PHP Documentation Group. [2230]
20.7.2.4.1. MySQL extension overview example
Copyright 1997-2012 the PHP Documentation Group. [2230]
This simple example shows how to connect, execute a query, print resulting rows and disconnect from
a MySQL database.
Example 20.22. MySQL extension overview example
<?php
// Connecting, selecting database
Original MySQL API (Mysql)
functions. The following constants are defined:
mysql_fetch_array
Description
mysql_db_name(), mysql_dbname(),
mysql_tablename(), and mysql_table_name().
Description
Use compression protocol
Allow space after function names
Allow interactive_timeout seconds (instead of
wait_timeout) of inactivity before closing the
connection.
Use SSL encryption. This flag is only available
with version 4.x of the MySQL client library or
newer. Version 3.23.x is bundled both with PHP 4
and Windows binaries of PHP 5.
uses a constant for the different types of result arrays. The
Description
Columns are returned into the array having the
fieldname as the array index.
Columns are returned into the array having both
a numerical index and the fieldname as the array
index.
Columns are returned into the array having a
numerical index to the fields. This index starts with
0, the first field in the result.
2241
and
mysql_connect

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents