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.
&reftitle.install;
By using the configuration
option you enable PHP to access MySQL databases. If you use this option
without specifying the path to MySQL, PHP will use the built-in MySQL
client libraries. With PHP4 MySQL support is always enabled; if you don't
specify the configure option, the bundled libraries are used. Users who
run other applications that use MySQL (for example, running PHP 3 and PHP
4 as concurrent apache modules, or auth-mysql) should always specify the
path to MySQL: . This will force
PHP to use the client libraries installed by MySQL, avoiding any
conflicts.
Crashes and startup problems of PHP may be encountered
when loading this extension in conjunction with the recode extension.
See the recode extension for more
information.
&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.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)) {
print "\t