mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
applied new structure and constansts.xml added
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@89160 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e9b93dcec2
commit
4ee5d74678
2 changed files with 134 additions and 105 deletions
114
reference/mysql/constants.xml
Normal file
114
reference/mysql/constants.xml
Normal file
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<section id="mysql.constants">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<para>
|
||||
Since PHP 4.3.0 it is possible to specify additional client flags for the
|
||||
<function>mysql_connect</function> and <function>mysql_pconnect</function>
|
||||
functions. The following constants are defined:
|
||||
<table>
|
||||
<title>MySQL client constants</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>constant</entry>
|
||||
<entry>description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>MYSQL_CLIENT_COMPRESS</entry>
|
||||
<entry>use compression protocol</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_CLIENT_IGNORE_SPACE</entry>
|
||||
<entry>Allow space after function names</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_CLIENT_INTERACTIVE</entry>
|
||||
<entry>Allow interactive_timeout seconds (instead of wait_timeout) of
|
||||
inactivity before closing the connection.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_CLIENT_SSL</entry>
|
||||
<entry>use SSL (encrypted protocol)</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The function <function>mysql_fetch_array</function> uses a constant for
|
||||
the different types of result arrays. The following constants are
|
||||
defined:
|
||||
<table>
|
||||
<title>MySQL fetch constants</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>constant</entry>
|
||||
<entry>description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>MYSQL_ASSOC</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having the fieldname as the array
|
||||
index.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_BOTH</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having both a numerical index
|
||||
and the fieldname as the array index.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_NUM</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having a numerical index to the
|
||||
fields. This index starts with 0, the first field in the result.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_STORE_RESULT</entry>
|
||||
<entry>
|
||||
Specifies that the MySQL result should be buffered.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_USE_RESULT</entry>
|
||||
<entry>
|
||||
Specifies that the MySQL result should not be buffered.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,22 +1,25 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<reference id="ref.mysql">
|
||||
<title>MySQL Functions</title>
|
||||
<titleabbrev>MySQL</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
<para id="mysql.intro">
|
||||
These functions allow you to access MySQL database servers.
|
||||
More information about MySQL can be found at <ulink
|
||||
url="&url.mysql;">&url.mysql;</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
Documentation for MySQL can be found at <ulink
|
||||
url="&url.mysql.docs;">&url.mysql.docs;</ulink>.
|
||||
</para>
|
||||
|
||||
<section id="mysql.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
These functions allow you to access MySQL database servers.
|
||||
More information about MySQL can be found at <ulink
|
||||
url="&url.mysql;">&url.mysql;</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
Documentation for MySQL can be found at <ulink
|
||||
url="&url.mysql.docs;">&url.mysql.docs;</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="mysql.requirements">
|
||||
<title>Requirements</title>
|
||||
&reftitle.required;
|
||||
<para>
|
||||
In order to have these functions available, you must compile PHP with
|
||||
MySQL support.
|
||||
|
@ -24,7 +27,7 @@
|
|||
</section>
|
||||
|
||||
<section id="mysql.installation">
|
||||
<title>Installation</title>
|
||||
&reftitle.install;
|
||||
<para>
|
||||
By using the <option role="configure">--with-mysql</option> configuration
|
||||
option you enable PHP to access MySQL databases. If you use this option
|
||||
|
@ -49,7 +52,7 @@
|
|||
</section>
|
||||
|
||||
<section id="mysql.configuration">
|
||||
<title>Runtime Configuration</title>
|
||||
&reftitle.runtime;
|
||||
<para>
|
||||
The behaviour of the MySQL functions is affected by settings in the
|
||||
global <link linkend="configuration.file">configuration file</link> &php.ini;.
|
||||
|
@ -251,7 +254,7 @@
|
|||
</section>
|
||||
|
||||
<section id="mysql.resources">
|
||||
<title>Resource types</title>
|
||||
&reftitle.resources;
|
||||
<para>
|
||||
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
|
||||
|
@ -259,99 +262,11 @@
|
|||
</para>
|
||||
</section>
|
||||
|
||||
<section id="mysql.constants">
|
||||
<title>Predefined constants</title>
|
||||
<para>
|
||||
Since PHP 4.3.0 it is possible to specify additional client flags for the
|
||||
<function>mysql_connect</function> and <function>mysql_pconnect</function>
|
||||
functions. The following constants are defined:
|
||||
<table>
|
||||
<title>MySQL client constants</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>constant</entry>
|
||||
<entry>description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>MYSQL_CLIENT_COMPRESS</entry>
|
||||
<entry>use compression protocol</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_CLIENT_IGNORE_SPACE</entry>
|
||||
<entry>Allow space after function names</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_CLIENT_INTERACTIVE</entry>
|
||||
<entry>Allow interactive_timeout seconds (instead of wait_timeout) of
|
||||
inactivity before closing the connection.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_CLIENT_SSL</entry>
|
||||
<entry>use SSL (encrypted protocol)</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
&reference.mysql.constants;
|
||||
|
||||
</para>
|
||||
<para>
|
||||
The function <function>mysql_fetch_array</function> uses a constant for
|
||||
the different types of result arrays. The following constants are
|
||||
defined:
|
||||
<table>
|
||||
<title>MySQL fetch constants</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>constant</entry>
|
||||
<entry>description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>MYSQL_ASSOC</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having the fieldname as the array
|
||||
index.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_BOTH</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having both a numerical index
|
||||
and the fieldname as the array index.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_NUM</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having a numerical index to the
|
||||
fields. This index starts with 0, the first field in the result.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_STORE_RESULT</entry>
|
||||
<entry>
|
||||
Specifies that the MySQL result should be buffered.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MYSQL_USE_RESULT</entry>
|
||||
<entry>
|
||||
Specifies that the MySQL result should not be buffered.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="mysql.examples">
|
||||
<title>Examples</title>
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
This simple example shows how to connect, execute a query, print
|
||||
resulting rows and disconnect from a MySQL database.
|
||||
|
|
Loading…
Reference in a new issue