MySQL FunctionsMySQL
&reftitle.intro;
These functions allow you to access MySQL database servers.
More information about MySQL can be found at &url.mysql;.
Documentation for MySQL can be found at &url.mysql.docs;.
&reftitle.required;
In order to have these functions available, you must compile PHP with
MySQL support.
&reference.mysql.configure;
&reference.mysql.ini;
&reftitle.resources;
There are two resource types used in the MySQL module. The first one
is the link identifier for a database connection, the second a resource
which holds the result of a query.
&reference.mysql.constants;
&reftitle.notes;
Most MySQL functions accept link_identifier as
the last optional parameter. If it is not provided, last opened
connection is used. If it doesn't exist, connection is tried to
establish with default parameters defined in &php.ini;. If it is not
successful, functions return &false;.
&reftitle.examples;
This simple example shows how to connect, execute a query, print
resulting rows and disconnect from a MySQL database.
MySQL extension overview example
\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t