wez Thu Sep 15 16:57:51 2005 EDT
Added files:
/phpdoc/en/reference/pdo driverconstants.xml
/phpdoc/en/reference/pdo_mysql constants.xml
Modified files:
/phpdoc/en/reference/pdo constants.xml
/phpdoc/en/reference/pdo_mysql reference.xml
/phpdoc/en/reference/pdo_pgsql reference.xml
Log:
more info on pdo
http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/constants.xml?r1=1.9&r2=1.10&ty=u
Index: phpdoc/en/reference/pdo/constants.xml
diff -u phpdoc/en/reference/pdo/constants.xml:1.9
phpdoc/en/reference/pdo/constants.xml:1.10
--- phpdoc/en/reference/pdo/constants.xml:1.9 Sun Sep 11 03:22:22 2005
+++ phpdoc/en/reference/pdo/constants.xml Thu Sep 15 16:57:50 2005
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc.
-->
<section id="pdo.constants">
&reftitle.constants;
@@ -394,6 +394,19 @@
<simpara>
Returns the name of the driver.
</simpara>
+ <para>
+ <example><title>using PDO_ATTR_DRIVER_NAME</title>
+ <programlisting role='php'>
+<![CDATA[
+<?php
+if ($db->getAttribute(PDO_ATTR_DRIVER_NAME) == 'mysql') {
+ echo "Running on mysql; doing something mysql specific here\n";
+}
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
</listitem>
</varlistentry>
http://cvs.php.net/diff.php/phpdoc/en/reference/pdo_mysql/reference.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc/en/reference/pdo_mysql/reference.xml
diff -u phpdoc/en/reference/pdo_mysql/reference.xml:1.5
phpdoc/en/reference/pdo_mysql/reference.xml:1.6
--- phpdoc/en/reference/pdo_mysql/reference.xml:1.5 Sun Sep 11 02:17:08 2005
+++ phpdoc/en/reference/pdo_mysql/reference.xml Thu Sep 15 16:57:51 2005
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- Purpose: database.vendors -->
<!-- Membership: bundled, external, pecl -->
@@ -11,12 +11,26 @@
<section id="pdo-mysql.intro">
&reftitle.intro;
<para>
- &warn.experimental;
PDO_MYSQL is a driver that implements the <link linkend="ref.pdo">PHP
Data Objects (PDO) interface</link>
to enable access from PHP to MySQL 3.x and 4.x databases.
</para>
+ <para>
+ PDO_MYSQL will take advantage of native prepared statement support
+ present in MySQL 4.1 and higher. If you're using an older version of the
+ mysql client libraries, PDO will emulate them for you.
+ </para>
+ <warning>
+ <para>
+ Beware: MySQL tables do not support transactions by default. When
+ writing transactional database code, MySQL will pretend that a
+ transaction was initiated successfully, even when no transactional
+ support is present. In addition, any DDL queries issued will implicitly
+ commit any pending transactions.
+ </para>
+ </warning>
</section>
+ &reference.pdo-mysql.constants;
</partintro>
<refentry id="ref.pdo-mysql.connection">
http://cvs.php.net/diff.php/phpdoc/en/reference/pdo_pgsql/reference.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc/en/reference/pdo_pgsql/reference.xml
diff -u phpdoc/en/reference/pdo_pgsql/reference.xml:1.5
phpdoc/en/reference/pdo_pgsql/reference.xml:1.6
--- phpdoc/en/reference/pdo_pgsql/reference.xml:1.5 Sun Sep 11 02:17:08 2005
+++ phpdoc/en/reference/pdo_pgsql/reference.xml Thu Sep 15 16:57:51 2005
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- Purpose: database.vendors -->
<!-- Membership: bundled, external, pecl -->
@@ -11,7 +11,6 @@
<section id="pdo-pgsql.intro">
&reftitle.intro;
<para>
- &warn.experimental;
PDO_PGSQL is a driver that implements the <link linkend="ref.pdo">PHP
Data Objects (PDO) interface</link>
to enable access from PHP to PostgreSQL databases.
http://cvs.php.net/co.php/phpdoc/en/reference/pdo/driverconstants.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo/driverconstants.xml
+++ phpdoc/en/reference/pdo/driverconstants.xml
<simpara>
The constants below are defined by this driver, and will only be available
when the extension has been either compiled into PHP or dynamically loaded at
runtime. In addition, these driver specific constants should only be used if
you are using this driver. Using mysql specific attributes into the postgres
driver may result in unexpected behaviour.
You can use <function>PDO::getAttribute</function> to obtain the
<constant>PDO_ATTR_DRIVER_NAME</constant> attribute to check the driver, if
your code can run against multiple drivers.
</simpara>
http://cvs.php.net/co.php/phpdoc/en/reference/pdo_mysql/constants.xml?r=1.1&p=1
Index: phpdoc/en/reference/pdo_mysql/constants.xml
+++ phpdoc/en/reference/pdo_mysql/constants.xml
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<section id="pdo-mysql.constants">
&reftitle.constants;
&reference.pdo.driverconstants;
<variablelist>
<varlistentry>
<term>
<constant>PDO_MYSQL_ATTR_USE_BUFFERED_QUERY</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
If this attribute is set to &true; on a
<classname>PDOStatement</classname>, the MySQL driver will use the
buffered versions of the MySQL API. If you're writing portable code, you
should use <function>PDOStatement::fetchAll</function> instead.
</simpara>
<para>
<example><title>Forcing queries to be buffered in mysql</title>
<programlisting role='php'>
<![CDATA[
<?php
if ($db->getAttribute(PDO_ATTR_DRIVERNAME) == 'mysql')) {
$stmt = $db->prepare('select * from foo',
array(PDO_MYSQL_ATTR_USE_UNBUFFERED_QUERY => true));
} else {
die("my application only works with mysql; I should use \$stmt->fetchAll()
instead");
}
]]>
</programlisting>
</example>
</para>
</listitem>
</varlistentry>
</variablelist>
</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
-->