Original MySQL API (
Mysql
)
2241
Version
Description
mysql_db_name(), mysql_dbname(),
mysql_tablename(), and mysql_table_name().
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_connect
and
mysql_pconnect
functions. The following constants are defined:
Table 20.34. MySQL client constants
Constant
Description
MYSQL_CLIENT_COMPRESS
Use compression protocol
MYSQL_CLIENT_IGNORE_SPACE
Allow space after function names
MYSQL_CLIENT_INTERACTIVE
Allow interactive_timeout seconds (instead of
wait_timeout
) of inactivity before closing the
connection.
MYSQL_CLIENT_SSL
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.
The function
mysql_fetch_array
uses a constant for the different types of result arrays. The
following constants are defined:
Table 20.35. MySQL fetch constants
Constant
Description
MYSQL_ASSOC
Columns are returned into the array having the
fieldname as the array index.
MYSQL_BOTH
Columns are returned into the array having both
a numerical index and the fieldname as the array
index.
MYSQL_NUM
Columns are returned into the array having a
numerical index to the fields. This index starts with
0, the first field in the result.
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
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...