dbs Thu Aug 11 22:03:52 2005 EDT
Added files:
/phpdoc/en/reference/pdo_dblib reference.xml
/phpdoc/en/reference/pdo_firebird reference.xml
/phpdoc/en/reference/pdo_mysql reference.xml
/phpdoc/en/reference/pdo_oci reference.xml
/phpdoc/en/reference/pdo_odbc reference.xml
/phpdoc/en/reference/pdo_pgsql reference.xml
/phpdoc/en/reference/pdo_sqlite reference.xml
Modified files:
/phpdoc/en/reference/mysqli reference.xml
/phpdoc/en/reference/pdo reference.xml
/phpdoc/en/reference/pdo/functions PDO-construct.xml
/phpdoc/scripts file-entities.php.in
Log:
Begin splitting PDO driver docs into separate manual sections.
Implement sorted Function Reference section of manual table of contents;
this may need more work for non-English manuals.
Fix mysqli title so it sorts correctly in sorted table of contents.
http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/reference.xml?r1=1.21&r2=1.22&ty=u
Index: phpdoc/en/reference/mysqli/reference.xml
diff -u phpdoc/en/reference/mysqli/reference.xml:1.21
phpdoc/en/reference/mysqli/reference.xml:1.22
--- phpdoc/en/reference/mysqli/reference.xml:1.21 Sat May 14 14:40:36 2005
+++ phpdoc/en/reference/mysqli/reference.xml Thu Aug 11 22:03:48 2005
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.21 $ -->
+<!-- $Revision: 1.22 $ -->
<reference id='ref.mysqli'>
- <title>Improved MySQL Extension</title>
+ <title>MySQL Improved Extension</title>
<titleabbrev>mysqli</titleabbrev>
<partintro>
http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/reference.xml?r1=1.27&r2=1.28&ty=u
Index: phpdoc/en/reference/pdo/reference.xml
diff -u phpdoc/en/reference/pdo/reference.xml:1.27
phpdoc/en/reference/pdo/reference.xml:1.28
--- phpdoc/en/reference/pdo/reference.xml:1.27 Wed Aug 10 04:36:30 2005
+++ phpdoc/en/reference/pdo/reference.xml Thu Aug 11 22:03:48 2005
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.27 $ -->
+<!-- $Revision: 1.28 $ -->
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc.
-->
<reference id="ref.pdo">
<title>PDO Functions</title>
@@ -98,7 +98,7 @@
</screen>
</para>
<para>
- These DLL's should exist in the systems
+ These DLLs should exist in the system's
<link linkend="ini.extension-dir">extension_dir</link>.
</para>
</step>
@@ -145,8 +145,8 @@
Manually build and install the PDO extension:
<screen>
<![CDATA[
-bash$ tar xzf PDO-0.2.tgz
-bash$ cd PDO-0.2
+bash$ tar xzf PDO-0.9.tgz
+bash$ cd PDO-0.9
bash$ phpize
bash$ ./configure
bash$ make
@@ -176,36 +176,32 @@
</thead>
<tbody>
<row>
- <entry>PDO_DBLIB</entry>
+ <entry><link linkend="ref.pdo-dblib">PDO_DBLIB</link></entry>
<entry>FreeTDS / Microsoft SQL Server / Sybase</entry>
</row>
<row>
- <entry>PDO_FIREBIRD</entry>
+ <entry><link linkend="ref.pdo-firebird">PDO_FIREBIRD</link></entry>
<entry>Firebird/Interbase 6</entry>
</row>
<row>
- <entry>PDO_MYSQL</entry>
- <entry>MySQL 3.x/4.0</entry>
+ <entry><link linkend="ref.pdo-mysql">PDO_MYSQL</link></entry>
+ <entry>MySQL 3.x/4.x</entry>
</row>
<row>
- <entry>PDO_OCI</entry>
+ <entry><link linkend="ref.pdo-oci">PDO_OCI</link></entry>
<entry>Oracle Call Interface</entry>
</row>
<row>
- <entry>PDO_ODBC</entry>
+ <entry><link linkend="ref.pdo-odbc">PDO_ODBC</link></entry>
<entry>ODBC v3 (IBM DB2, unixODBC and win32 ODBC)</entry>
</row>
<row>
- <entry>PDO_PGSQL</entry>
+ <entry><link linkend="ref.pdo-pgsql">PDO_PGSQL</link></entry>
<entry>PostgreSQL</entry>
</row>
<row>
- <entry>PDO_SQLITE</entry>
- <entry>SQLite 3.x</entry>
- </row>
- <row>
- <entry>sqlite</entry>
- <entry>SQLite 2.x (PHP 5.1 and up)</entry>
+ <entry><link linkend="ref.pdo-sqlite">PDO_SQLITE</link></entry>
+ <entry>SQLite 3 and SQLite 2</entry>
</row>
</tbody>
</tgroup>
http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/functions/PDO-construct.xml?r1=1.12&r2=1.13&ty=u
Index: phpdoc/en/reference/pdo/functions/PDO-construct.xml
diff -u phpdoc/en/reference/pdo/functions/PDO-construct.xml:1.12
phpdoc/en/reference/pdo/functions/PDO-construct.xml:1.13
--- phpdoc/en/reference/pdo/functions/PDO-construct.xml:1.12 Mon Jul 11
00:38:55 2005
+++ phpdoc/en/reference/pdo/functions/PDO-construct.xml Thu Aug 11 22:03:49 2005
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<refentry id="function.PDO-construct">
<refnamediv>
<refname>PDO::__construct</refname>
@@ -34,88 +34,9 @@
</para>
<para>
In general, a DSN consists of the PDO driver name, followed by a
colon,
- followed by the PDO driver-specific connection syntax. Examples of
each
- driver are given below:
- </para>
- <para>
- <variablelist>
- <varlistentry>
- <term><constant>PDO_DBLIB</constant></term>
- <listitem>
- <para>
- The DSN prefix is either <userinput>sybase:</userinput>
- or <userinput>mssql:</userinput> depending on which libraries
- it was linked against during compilation.
- </para>
- <para><userinput>sybase:host=localhost;
dbname=testdb</userinput></para>
- <para><userinput>mssql:host=localhost;
dbname=testdb</userinput></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>PDO_FIREBIRD</constant></term>
- <listitem>
-
<para><userinput>firebird:User=john;Password=mypass;Database=DATABASE.GDE;DataSource=localhost;Port=3050</userinput></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>PDO_MYSQL</constant></term>
- <listitem>
-
<para><userinput>mysql:host=localhost;dbname=testdb</userinput></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>PDO_OCI</constant></term>
- <listitem>
- <para>To connect via <filename>tnsnames.ora</filename>, use:</para>
- <para><userinput>oci:mydb</userinput></para>
- <para>If using instantclient, use:</para>
-
<para><userinput>oci:dbname=//localhost:1521/testdb</userinput></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>PDO_ODBC</constant></term>
- <listitem>
-
<para><userinput>odbc:DSN=SAMPLE;UID=john;PWD=mypass</userinput></para>
- <para>DSN=SAMPLE refers to the SAMPLE data source configured in
the ODBC driver manager.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>PDO_PGSQL</constant></term>
- <listitem>
- <para><userinput>pgsql:host=localhost port=5432 dbname=testdb
user=john password=mypass</userinput></para>
- <para>
- Note, by passing <varname>user</varname> and
<varname>password</varname>
- in the DSN, the <parameter>username</parameter>
- and <parameter>password</parameter> parameters become optional.
- If specified, they are glued to the end of the connection string.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>PDO_SQLITE</constant></term>
- <listitem>
- <para><userinput>sqlite:/path/to/database</userinput></para>
- <para>To create a database in memory, use:</para>
- <para><userinput>sqlite::memory:</userinput></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>sqlite (version 2)</constant></term>
- <listitem>
- <para><userinput>sqlite2:/path/to/database</userinput></para>
- <para>To create a database in memory, use:</para>
- <para><userinput>sqlite2::memory:</userinput></para>
- <note>
- <para>
- The SQLite 2 PDO driver provides access to old SQLite 2
- databases that you may have created with earlier versions
- of PHP. It is recommended that you migrate to SQLite 3 (the
- PDO_SQLITE driver), as it has superior features and performance.
- </para>
- </note>
- </listitem>
- </varlistentry>
- </variablelist>
+ followed by the PDO driver-specific connection syntax. Further
+ information is available from the <link linkend="pdo.drivers">PDO
+ driver-specific documentation</link>.
</para>
<para>
The <parameter>dsn</parameter> parameter supports three
http://cvs.php.net/diff.php/phpdoc/scripts/file-entities.php.in?r1=1.37&r2=1.38&ty=u
Index: phpdoc/scripts/file-entities.php.in
diff -u phpdoc/scripts/file-entities.php.in:1.37
phpdoc/scripts/file-entities.php.in:1.38
--- phpdoc/scripts/file-entities.php.in:1.37 Wed Apr 6 13:16:45 2005
+++ phpdoc/scripts/file-entities.php.in Thu Aug 11 22:03:50 2005
@@ -17,7 +17,7 @@
| Gabor Hojtsy <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: file-entities.php.in,v 1.37 2005/04/06 17:16:45 nlopess Exp $
+ $Id: file-entities.php.in,v 1.38 2005/08/12 02:03:50 dbs Exp $
*/
/**
@@ -52,7 +52,7 @@
$not_windows = !eregi('WIN',PHP_OS);
-// The dir for PHP. If the cygwin wasn't compiled on Cygwin, the path needs to
be striped.
+// The dir for PHP. If the cygwin wasn't compiled on Cygwin, the path needs to
be stripped.
$out_dir = ($not_windows || eregi('CYGWIN',php_uname()))? "@WORKDIR@" :
abs_path(strip_cygdrive("@WORKDIR@"));
// The language encoding to use
@@ -70,7 +70,7 @@
// ......:ENTITY
CREATION:......................................................
-// Put all the file entitites into $entities
+// Put all the file entities into $entities
$entities = array();
file_entities("$out_dir/en", "$out_dir/@LANGDIR@", "$out_dir/en", $entities);
@@ -81,8 +81,11 @@
if (is_file("$refdir/$dir/reference.xml")
&& !is_file("$refdir/$dir/EXCLUDE")) {
$dirent = str_replace("_","-",$dir);
- $builtin_extensions[] = "&reference.$dirent.reference;";
+ $title = get_title("$refdir/$dir/reference.xml");
+ if (!$title) $title = $dirent; // extension name is close enough
+ $builtin_extensions[$title] = "&reference.$dirent.reference;";
}
+ ksort($builtin_extensions);
}
create_part_file("entities/builtin-extensions.xml", $builtin_extensions,
'funcref', '&FunctionReference;');
@@ -116,6 +119,7 @@
continue;
}
$pecl_extensions[] = "&reference.$dirent.reference;";
+ sort($pecl_extensions);
}
}
closedir($dh);
@@ -140,6 +144,7 @@
continue;
}
$addon_extensions[] = "&reference.$dirent.reference;";
+ $sort($addon_extensions);
}
create_part_file("entities/addon-extensions.xml", $addon_extensions,
'addon-funcref', '&AddOnReference;');
@@ -436,8 +441,6 @@
{
global $out_dir, $encoding;
- sort($entities);
-
$fp = fopen("$out_dir/$filename","w");
fputs($fp, "<?xml version='1.0' encoding='$encoding' ?>\n");
fputs($fp, "<!-- FILE AUTOGENERATED BY file-entities.php, DO NOT EDIT
!!! -->\n");
@@ -450,8 +453,38 @@
}
fputs($fp,"</part>\n");
} else {
- fputs($fp, "<!-- File intentionaly left blank -->\n");
+ fputs($fp, "<!-- File intentionally left blank -->\n");
}
fclose($fp);
}
+
+/**
+ * Pull the main title from reference.xml for sorting the table of contents.
+ * To avoid bogus sorting, trim whitespace and convert the string to upper
case.
+ *
+ * @param filename Path to reference.xml (relative to phpdoc dir)
+ */
+function get_title ($filename)
+{
+ $matches = array();
+
+ $contents = file_get_contents($filename);
+
+ /*
+ * Very basic approach for getting the title. We really should:
+ * - strip all comments (<!-- --> and <![CDATA[ ]]>) before
+ * searching for <title>
+ * - strip tags from inside <title> ... </title>
+ * - resolve character entities
+ *
+ * ... but this is probably good enough for 98.5% of extensions
+ */
+
+ if (preg_match("#<title>(.*?)</title>#", $contents, $matches)) {
+ return strtoupper(trim($matches[1]));
+ }
+
+ return null;
+}
+
?>
http://cvs.php.net/co.php/phpdoc/en/reference/pdo_dblib/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo_dblib/reference.xml
+++ phpdoc/en/reference/pdo_dblib/reference.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<reference id="ref.pdo-dblib">
<title>Microsoft SQL Server and Sybase Functions (PDO_DBLIB)</title>
<titleabbrev>PDO_DBLIB</titleabbrev>
<partintro>
<section id="pdo-dblib.intro">
&reftitle.intro;
<para>
&warn.experimental;
PDO_DBLIB is a driver that implements the PHP Data Objects (PDO) interface
to enable access from PHP to Microsoft SQL Server and Sybase databases
through the FreeTDS libary.
</para>
<para>
On Windows, you should use the <link linkend="ref.pdo-odbc">PDO_ODBC</link>
driver to connect to Microsoft SQL Server and Sybase databases, as PDO_ODBC
is built directly against the Microsoft Windows ODBC Driver Manager
libraries.
</para>
</section>
</partintro>
<refentry id="ref.pdo-dblib.connection">
<refnamediv>
<refname>PDO_DBLIB DSN</refname>
<refpurpose>Connecting to Microsoft SQL Server and Sybase
databases</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
The PDO_DBLIB Data Source Name (DSN) is composed of the following elements:
<variablelist>
<varlistentry>
<term>DSN prefix</term>
<listitem>
<para>
The DSN prefix is <userinput>sybase:</userinput> if PDO_DBLIB was
linked against the FreeTDS libraries, or <userinput>mssql:</userinput>
if PDO_DBLIB was linked against the Microsoft SQL Server libraries.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>host</constant></term>
<listitem>
<para>
The hostname on which the database server resides.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>dbname</constant></term>
<listitem>
<para>
The name of the database.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>PDO_DBLIB DSN examples</title>
<para>
The following examples show a PDO_DBLIB DSN for connecting to
Microsoft SQL Server and Sybase databases:
<programlisting><![CDATA[
mssql:host=localhost;dbname=testdb
sybase:host=localhost;dbname=testdb
]]>
</programlisting>
</para>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- 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
-->
http://cvs.php.net/co.php/phpdoc/en/reference/pdo_firebird/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo_firebird/reference.xml
+++ phpdoc/en/reference/pdo_firebird/reference.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<reference id="ref.pdo-firebird">
<title>Firebird/Interbase Functions (PDO_FIREBIRD)</title>
<titleabbrev>PDO_FIREBIRD</titleabbrev>
<partintro>
<section id="pdo-firebird.intro">
&reftitle.intro;
<para>
&warn.experimental;
PDO_FIREBIRD is a driver that implements the PHP Data Objects (PDO)
interface to enable access from PHP to Firebird and Interbase databases.
</para>
</section>
</partintro>
<refentry id="ref.pdo-firebird.connection">
<refnamediv>
<refname>PDO_FIREBIRD DSN</refname>
<refpurpose>Connecting to Firebird and Interbase databases</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
The PDO_FIREBIRD Data Source Name (DSN) is composed of the following
elements:
<variablelist>
<varlistentry>
<term>DSN prefix</term>
<listitem>
<para>
The DSN prefix is <userinput>firebird:</userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>DataSource</constant></term>
<listitem>
<para>
The hostname on which the database server resides.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>Port</constant></term>
<listitem>
<para>
The port number for the server on which the database is running.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>Database</constant></term>
<listitem>
<para>
The name of the database.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>User</constant></term>
<listitem>
<para>
The name of the user that will connect to the database.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>Password</constant></term>
<listitem>
<para>
The password for the user.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>PDO_firebird DSN examples</title>
<para>
The following example shows a PDO_FIREBIRD DSN for connecting to
Firebird and Interbase databases:
<programlisting><![CDATA[
firebird:User=john;Password=mypass;Database=DATABASE.GDE;DataSource=localhost;Port=3050
]]>
</programlisting>
</para>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- 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
-->
http://cvs.php.net/co.php/phpdoc/en/reference/pdo_mysql/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo_mysql/reference.xml
+++ phpdoc/en/reference/pdo_mysql/reference.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<reference id="ref.pdo-mysql">
<title>MySQL Functions (PDO_MYSQL)</title>
<titleabbrev>PDO_MYSQL</titleabbrev>
<partintro>
<section id="pdo-mysql.intro">
&reftitle.intro;
<para>
&warn.experimental;
PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface
to enable access from PHP to MySQL 3.x and 4.x databases.
</para>
</section>
</partintro>
<refentry id="ref.pdo-mysql.connection">
<refnamediv>
<refname>PDO_MYSQL DSN</refname>
<refpurpose>Connecting to MySQL databases</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
The PDO_MYSQL Data Source Name (DSN) is composed of the following elements:
<variablelist>
<varlistentry>
<term>DSN prefix</term>
<listitem>
<para>
The DSN prefix is <userinput>mysql:</userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>host</constant></term>
<listitem>
<para>
The hostname on which the database server resides.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>dbname</constant></term>
<listitem>
<para>
The name of the database.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>PDO_MYSQL DSN examples</title>
<para>
The following example shows a PDO_MYSQL DSN for connecting to
MySQL databases:
<programlisting><![CDATA[
mysql:host=localhost;dbname=testdb
]]>
</programlisting>
</para>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- 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
-->
http://cvs.php.net/co.php/phpdoc/en/reference/pdo_oci/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo_oci/reference.xml
+++ phpdoc/en/reference/pdo_oci/reference.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<reference id="ref.pdo-oci">
<title>Oracle Functions (PDO_OCI)</title>
<titleabbrev>PDO_OCI</titleabbrev>
<partintro>
<section id="pdo-oci.intro">
&reftitle.intro;
<para>
&warn.experimental;
PDO_OCI is a driver that implements the PHP Data Objects (PDO) interface
to enable access from PHP to Oracle databases through the OCI library.
</para>
</section>
</partintro>
<refentry id="ref.pdo-oci.connection">
<refnamediv>
<refname>PDO_OCI DSN</refname>
<refpurpose>Connecting to Oracle databases</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
The PDO_OCI Data Source Name (DSN) is composed of the following elements:
<variablelist>
<varlistentry>
<term>DSN prefix</term>
<listitem>
<para>
The DSN prefix is <userinput>oci:</userinput>. If you are connecting
to a database defined in <filename>tnsnames.ora</filename>, append the
name of the database to the DSN prefix and your DSN is complete.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>dbname</constant> (Oracle Instant Client)</term>
<listitem>
<para>
The URI for the Oracle Instant Client connection takes the form of
<userinput>dbname=//<varname>hostname</varname>:<varname>port-number</varname>/<varname>database</varname></userinput>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>PDO_OCI DSN examples</title>
<para>
The following examples show a PDO_OCI DSN for connecting to
Oracle databases:
<programlisting><![CDATA[
oci:mydb
oci:dbname=//localhost:1521/mydb
]]>
</programlisting>
</para>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- 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
-->
http://cvs.php.net/co.php/phpdoc/en/reference/pdo_odbc/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo_odbc/reference.xml
+++ phpdoc/en/reference/pdo_odbc/reference.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<reference id="ref.pdo-odbc">
<title>ODBC and DB2 functions (PDO_ODBC)</title>
<titleabbrev>PDO_ODBC</titleabbrev>
<partintro>
<section id="pdo-odbc.intro">
&reftitle.intro;
<para>
&warn.experimental;
PDO_ODBC is a driver that implements the PHP Data Objects (PDO) interface
to enable access from PHP to databases through ODBC drivers or through the
IBM DB2 Call Level Interface (DB2 CLI) library.
</para>
<para>
On Windows, PDO_ODBC is built into the PHP core by default. It is linked
against the Windows ODBC Driver Manager so that PHP can connect to any
database cataloged as a System DSN, and is the recommended driver for
connecting to Microsoft SQL Server databases.
</para>
</section>
</partintro>
<refentry id="ref.pdo-odbc.connection">
<refnamediv>
<refname>PDO_ODBC DSN</refname>
<refpurpose>Connecting to ODBC or DB2 databases</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
The PDO_ODBC Data Source Name (DSN) is composed of the following elements:
<variablelist>
<varlistentry>
<term>DSN prefix</term>
<listitem>
<para>
The DSN prefix is <userinput>odbc:</userinput>. If you are connecting
to a database cataloged in the ODBC driver manager or the DB2 catalog,
you can append the cataloged name of the database to the DSN.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>DSN</constant></term>
<listitem>
<para>
The name of the database as cataloged in the ODBC driver manager or
the DB2 catalog. Alternately, you can provide a complete ODBC
connection string to connect to a database as described at
<ulink url="http://connectionstrings.com"/>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>UID</constant></term>
<listitem>
<para>
The name of the user for the connection. If you specify the user name
in the DSN, PDO ignores the value of the user name argument in the
PDO constructor.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>PWD</constant></term>
<listitem>
<para>
The password of the user for the connection. If you specify the
password in the DSN, PDO ignores the value of the password argument
in the PDO constructor.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>PDO_ODBC DSN example (ODBC driver manager)</title>
<para>
The following example shows a PDO_ODBC DSN for connecting to
an ODBC database cataloged as testdb in the ODBC driver manager:
<programlisting><![CDATA[
odbc:testdb
]]>
</programlisting>
</para>
</example>
<example>
<title>PDO_ODBC DSN example (IBM DB2 uncataloged connection)</title>
<para>
The following example shows a PDO_ODBC DSN for connecting to
an IBM DB2 database named <userinput>SAMPLE</userinput> using the full
ODBC DSN syntax:
<programlisting><![CDATA[
odbc:DSN={IBM DB2
ODBC};HOSTNAME=localhost;PORT=50000;DBNAME=SAMPLE;PROTOCOL=TCPIP;UID=db2inst1;PWD=ibmdb2;
]]>
</programlisting>
</para>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- 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
-->
http://cvs.php.net/co.php/phpdoc/en/reference/pdo_pgsql/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo_pgsql/reference.xml
+++ phpdoc/en/reference/pdo_pgsql/reference.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<reference id="ref.pdo-pgsql">
<title>PostgreSQL Functions (PDO_PGSQL)</title>
<titleabbrev>PDO_PGSQL</titleabbrev>
<partintro>
<section id="pdo-pgsql.intro">
&reftitle.intro;
<para>
&warn.experimental;
PDO_PGSQL is a driver that implements the PHP Data Objects (PDO) interface
to enable access from PHP to PostgreSQL databases.
</para>
</section>
</partintro>
<refentry id="ref.pdo-pgsql.connection">
<refnamediv>
<refname>PDO_PGSQL DSN</refname>
<refpurpose>Connecting to PostgreSQL databases</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
The PDO_PGSQL Data Source Name (DSN) is composed of the following
elements, delimited by spaces:
<variablelist>
<varlistentry>
<term>DSN prefix</term>
<listitem>
<para>
The DSN prefix is <userinput>pgsql:</userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>host</constant></term>
<listitem>
<para>
The hostname on which the database server resides.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>port</constant></term>
<listitem>
<para>
The port on which the database server is running.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>dbname</constant></term>
<listitem>
<para>
The name of the database.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>user</constant></term>
<listitem>
<para>
The name of the user for the connection. If you specify the user name
in the DSN, PDO ignores the value of the user name argument in the
PDO constructor.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>password</constant></term>
<listitem>
<para>
The password of the user for the connection. If you specify the
password in the DSN, PDO ignores the value of the password argument
in the PDO constructor.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>PDO_PGSQL DSN examples</title>
<para>
The following example shows a PDO_PGSQL DSN for connecting to
a PostgreSQL database:
<programlisting><![CDATA[
pgsql:host=localhost port=5432 dbname=testdb user=bruce password=mypass
]]>
</programlisting>
</para>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- 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
-->
http://cvs.php.net/co.php/phpdoc/en/reference/pdo_sqlite/reference.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo_sqlite/reference.xml
+++ phpdoc/en/reference/pdo_sqlite/reference.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<reference id="ref.pdo-sqlite">
<title>SQLite Functions (PDO_SQLITE)</title>
<titleabbrev>PDO_SQLITE</titleabbrev>
<partintro>
<section id="pdo-sqlite.intro">
&reftitle.intro;
<para>
&warn.experimental;
PDO_SQLITE is a driver that implements the PHP Data Objects (PDO) interface
to enable access to SQLite 2 and SQLite 3 databases.
</para>
</section>
</partintro>
<refentry id="ref.pdo-sqlite.connection">
<refnamediv>
<refname>PDO_SQLITE DSN</refname>
<refpurpose>Connecting to Microsoft SQL Server and Sybase
databases</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
The PDO_SQLITE Data Source Name (DSN) is composed of the following
elements:
<variablelist>
<varlistentry>
<term>DSN prefix (SQLite 3)</term>
<listitem>
<para>
The DSN prefix is <userinput>sqlite:</userinput>.
<itemizedlist>
<listitem>
<para>
To access a database on disk, append the absolute path to the
DSN prefix.
</para>
</listitem>
<listitem>
<para>
To create a database in memory, append <literal>memory:</literal>
to the DSN prefix.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>DSN prefix (SQLite 2)</term>
<listitem>
<para>
While the default and recommended SQLite version in PDO_SQLITE is
version 3, the driver also supports accessing and creating SQLite 2
databases. This enables you to access databases you may have created
with the <link linkend="ref.sqlite">SQLite</link> extension in
previous versions of PHP.
</para>
<para>
The DSN prefix for connecting to SQLite 2 databases is
<userinput>sqlite2:</userinput>.
<itemizedlist>
<listitem>
<para>
To access a database on disk, append the absolute path to the
DSN prefix.
</para>
</listitem>
<listitem>
<para>
To create a database in memory, append <literal>memory:</literal>
to the DSN prefix.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>PDO_SQLITE DSN examples</title>
<para>
The following examples show PDO_SQLITE DSN for connecting to
SQLite databases:
<programlisting><![CDATA[
sqlite:/opt/databases/mydb.sq3
sqlite:memory:
sqlite2:/opt/databases/mydb.sq2
sqlite2:memory:
]]>
</programlisting>
</para>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- 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
-->