cvs: peardoc /en/package/database/mdb/mdb-common fetchall.xml fetchcol.xml fetchone.xml fetchrow.xml
| From: | Lukas Smith | Date: | Thu, 05 Jun 2003 21:39:40 +0000 |
| Subject: | cvs: peardoc /en/package/database/mdb/mdb-common fetchall.xml fetchcol.xml fetchone.xml fetchrow.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-885@lists.php.net to get a copy of this message | ||
lsmith Thu Jun 5 17:39:40 2003 EDT
Added files:
/peardoc/en/package/database/mdb/mdb-common fetchrow.xml
fetchone.xml
fetchcol.xml
fetchall.xml
Log:
initial version
Index: peardoc/en/package/database/mdb/mdb-common/fetchrow.xml +++ peardoc/en/package/database/mdb/mdb-common/fetchrow.xml <!-- $Revision: 1.1 $ --> <refentry id="package.database.mdb.mdb-common.fetchrow"> <refnamediv> <refname>MDB_Common::fetchRow()</refname> <refpurpose>fetch the first row</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'MDB.php'; </funcsynopsisinfo> <funcprototype> <funcdef> array <function>&fetchRow</function> </funcdef> <paramdef>resource <parameter>$result</parameter> </paramdef> <paramdef> array <parameter> <optional>$types = NULL</optional> </parameter> </paramdef> <paramdef> array <parameter> <optional>$params = array()</optional> </parameter> </paramdef> <paramdef> array <parameter> <optional>$param_types = NULL</optional> </parameter> </paramdef> <paramdef> integer <parameter> <optional>$fetchmode = <constant>MDB_FETCHMODE_DEFAULT</constant> </optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.mdb.mdb-common.fetchrow.desc"> &title.desc; <para> Fetch the first row of data returned from a result set and free the result set. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.resource; <parameter>$result</parameter> </term> <listitem> <para> a valid resource returned by <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> or <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$params</parameter> </term> <listitem> <para> if supplied, <link linkend="package.database.mdb.intro-execute"> <function>prepare</function>/ <function>execute</function> </link> will be used with this array as execute parameters </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$param_types</parameter> </term> <listitem> <para> if supplied, the values in $param will automatically set to the passed datatypes </para> </listitem> </varlistentry> <varlistentry> <term> &type.int; <parameter>$fetchmode</parameter> </term> <listitem> <para> the fetch mode to use, default is <constant>MDB_FETCHMODE_DEFAULT</constant> </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.return"> &title.returns; <para> <parameter>array</parameter> - the first row of results as an array indexed from 0 or a &class.mdb-error;, if fail </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>every other error code</entry> <entry/> <entry> Database specific error </entry> <entry> Check the database related section of <ulink url="www.php.net/manual/">PHP-Manual</ulink> to detect the reason for this error. In the most cases a misformed SQL statment. Ie. using LIMIT in a SQL-Statment for an Oracle database. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.see"> &title.see; <para> <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> </link>, <link linkend="package.database.mdb.mdb-common.limitquery"> <function>limitQuery</function> </link>, <link linkend="package.database.mdb.mdb-common.prepare"> <function>prepare</function> </link> <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </link>, <link linkend="package.database.mdb.mdb-common.fetchcol"> <function>fetchCol</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchrow"> <function>fetchRow</function> </link> </para> </refsect1> </refentry> <!-- 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-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t 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 --> Index: peardoc/en/package/database/mdb/mdb-common/fetchone.xml +++ peardoc/en/package/database/mdb/mdb-common/fetchone.xml <!-- $Revision: 1.1 $ --> <refentry id="package.database.mdb.mdb-common.fetchone"> <refnamediv> <refname>MDB_Common::fetchOne()</refname> <refpurpose>fetch the first column of the first row</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'MDB.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>&fetchOne</function> </funcdef> <paramdef>resource <parameter>$result</parameter> </paramdef> <paramdef> string <parameter> <optional>$type = NULL</optional> </parameter> </paramdef> <paramdef> array <parameter> <optional>$params = array()</optional> </parameter> </paramdef> <paramdef> array <parameter> <optional>$param_types = NULL</optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.mdb.mdb-common.fetchone.desc"> &title.desc; <para> Fetch the first column of the first row of data returned from a result set and free the result set. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.resource; <parameter>$result</parameter> </term> <listitem> <para> a valid resource returned by <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> or <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$params</parameter> </term> <listitem> <para> if supplied, <link linkend="package.database.mdb.intro-execute"> <function>prepare</function>/ <function>execute</function> </link> will be used with this array as execute parameters </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$param_types</parameter> </term> <listitem> <para> if supplied, the values in $param will automatically set to the passed datatypes </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.return"> &title.returns; <para> <parameter>mixed</parameter> - the returned value or a &class.mdb-error;, if fail </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>every other error code</entry> <entry/> <entry> Database specific error </entry> <entry> Check the database related section of <ulink url="www.php.net/manual/">PHP-Manual</ulink> to detect the reason for this error. In the most cases a misformed SQL statment. Ie. using LIMIT in a SQL-Statment for an Oracle database. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.see"> &title.see; <para> <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> </link>, <link linkend="package.database.mdb.mdb-common.limitquery"> <function>limitQuery</function> </link>, <link linkend="package.database.mdb.mdb-common.prepare"> <function>prepare</function> </link>, <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </link>, <link linkend="package.database.mdb.mdb-common.fetchrow"> <function>fetchRow</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchcol"> <function>fetchCol</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchone"> <function>fetchCol</function> </link> </para> </refsect1> </refentry> <!-- 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-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t 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 --> Index: peardoc/en/package/database/mdb/mdb-common/fetchcol.xml +++ peardoc/en/package/database/mdb/mdb-common/fetchcol.xml <!-- $Revision: 1.1 $ --> <refentry id="package.database.mdb.mdb-common.fetchcol"> <refnamediv> <refname>MDB_Common::fetchCol()</refname> <refpurpose>Fetch a single column</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'MDB.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>&fetchCol</function> </funcdef> <paramdef>resource <parameter>$result</parameter> </paramdef> <paramdef> string <parameter> <optional>$type = NULL</optional> </parameter> </paramdef> <paramdef> mixed <parameter> <optional>$colnum = 0</optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.mdb.mdb-common.fetchcol.desc"> &title.desc; <para> Fetch a single column from a result set of a result set and free the result set. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.resource; <parameter>$result</parameter> </term> <listitem> <para> a valid resource returned by <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> or <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$params</parameter> </term> <listitem> <para> if supplied, <link linkend="package.database.mdb.intro-execute"> <function>prepare</function>/ <function>execute</function> </link> will be used with this array as execute parameters </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$param_types</parameter> </term> <listitem> <para> if supplied, the values in $param will automatically set to the passed datatypes </para> </listitem> </varlistentry> <varlistentry> <term> &type.mixed; <parameter>$colnum</parameter> </term> <listitem> <para> which column to return (integer [column number, starting at 0] or string [column name]) </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.return"> &title.returns; <para> <parameter>array</parameter> - the first row of results as an array indexed from 0 or a &class.mdb-error;, if fail </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> <constant>MDB_ERROR_TRUNCATED</constant> </entry> <entry> <constant>null</constant> </entry> <entry> The result set contains fewer then two columns </entry> <entry> Check the SQL query or choose another <function>query*</function> function </entry> </row> <row> <entry>every other error code</entry> <entry/> <entry> Database specific error </entry> <entry> Check the database related section of <ulink url="www.php.net/manual/">PHP-Manual</ulink> to detect the reason for this error. In the most cases a misformed SQL statment. Ie. using LIMIT in a SQL-Statment for an Oracle database. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.see"> &title.see; <para> <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> </link>, <link linkend="package.database.mdb.mdb-common.limitquery"> <function>limitQuery</function> </link>, <link linkend="package.database.mdb.mdb-common.prepare"> <function>prepare</function> </link>, <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchrow"> <function>fetchRow</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchone"> <function>fetchOne</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchall"> <function>fetchAll</function> </link> </para> </refsect1> </refentry> <!-- 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-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t 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 --> Index: peardoc/en/package/database/mdb/mdb-common/fetchall.xml +++ peardoc/en/package/database/mdb/mdb-common/fetchall.xml <!-- $Revision: 1.1 $ --> <refentry id="package.database.mdb.mdb-common.fetchall"> <refnamediv> <refname>MDB_Common::fetchAll()</refname> <refpurpose>fetch result set as a nested array</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'MDB.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>&fetchAll</function> </funcdef> <paramdef>resource <parameter>$result</parameter> </paramdef> <paramdef> array <parameter> <optional>$types = NULL</optional> </parameter> </paramdef> <paramdef>integer <parameter> <optional>$fetchmode = <constant>MDB_FETCHMODE_DEFAULT</constant> </optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.mdb.mdb-common.fetchall.desc"> &title.desc; <para> Fetch the entire result set of a result set and return it into a nested array and free the result set. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.resource; <parameter>$result</parameter> </term> <listitem> <para> a valid resource returned by <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> or <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </para> </listitem> </varlistentry> <varlistentry> <term> &type.int; <parameter>$fetchmode</parameter> </term> <listitem> <para> the fetch mode to use </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.return"> &title.returns; <para> <parameter>array</parameter> - an nested array or a &class.mdb-error;, if fail. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> <constant>MDB_ERROR_TRUNCATED</constant> </entry> <entry> <constant>null</constant> </entry> <entry> The result set contains fewer then two columns </entry> <entry> Check the SQL fetch or choose another <function>fetch*</function> function </entry> </row> <row> <entry>every other error code</entry> <entry/> <entry> Database specific error </entry> <entry> Check the database related section of <ulink url="www.php.net/manual/">PHP-Manual</ulink> to detect the reason for this error. In the most cases a misformed SQL statment. Ie. using LIMIT in a SQL-Statment for an Oracle database. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.see"> &title.see; <para> <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> </link>, <link linkend="package.database.mdb.mdb-common.limitquery"> <function>limitQuery</function> </link>, <link linkend="package.database.mdb.mdb-common.prepare"> <function>prepare</function> </link>, <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchrow"> <function>fetchRow</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchone"> <function>fetchOne</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchcol"> <function>fetchCol</function> </link> </para> </refsect1> </refentry> <!-- 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-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t 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 -->
Index: peardoc/en/package/database/mdb/mdb-common/fetchrow.xml +++ peardoc/en/package/database/mdb/mdb-common/fetchrow.xml <!-- $Revision: 1.1 $ --> <refentry id="package.database.mdb.mdb-common.fetchrow"> <refnamediv> <refname>MDB_Common::fetchRow()</refname> <refpurpose>fetch the first row</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'MDB.php'; </funcsynopsisinfo> <funcprototype> <funcdef> array <function>&fetchRow</function> </funcdef> <paramdef>resource <parameter>$result</parameter> </paramdef> <paramdef> array <parameter> <optional>$types = NULL</optional> </parameter> </paramdef> <paramdef> array <parameter> <optional>$params = array()</optional> </parameter> </paramdef> <paramdef> array <parameter> <optional>$param_types = NULL</optional> </parameter> </paramdef> <paramdef> integer <parameter> <optional>$fetchmode = <constant>MDB_FETCHMODE_DEFAULT</constant> </optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.mdb.mdb-common.fetchrow.desc"> &title.desc; <para> Fetch the first row of data returned from a result set and free the result set. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.resource; <parameter>$result</parameter> </term> <listitem> <para> a valid resource returned by <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> or <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$params</parameter> </term> <listitem> <para> if supplied, <link linkend="package.database.mdb.intro-execute"> <function>prepare</function>/ <function>execute</function> </link> will be used with this array as execute parameters </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$param_types</parameter> </term> <listitem> <para> if supplied, the values in $param will automatically set to the passed datatypes </para> </listitem> </varlistentry> <varlistentry> <term> &type.int; <parameter>$fetchmode</parameter> </term> <listitem> <para> the fetch mode to use, default is <constant>MDB_FETCHMODE_DEFAULT</constant> </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.return"> &title.returns; <para> <parameter>array</parameter> - the first row of results as an array indexed from 0 or a &class.mdb-error;, if fail </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>every other error code</entry> <entry/> <entry> Database specific error </entry> <entry> Check the database related section of <ulink url="www.php.net/manual/">PHP-Manual</ulink> to detect the reason for this error. In the most cases a misformed SQL statment. Ie. using LIMIT in a SQL-Statment for an Oracle database. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchrow.see"> &title.see; <para> <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> </link>, <link linkend="package.database.mdb.mdb-common.limitquery"> <function>limitQuery</function> </link>, <link linkend="package.database.mdb.mdb-common.prepare"> <function>prepare</function> </link> <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </link>, <link linkend="package.database.mdb.mdb-common.fetchcol"> <function>fetchCol</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchrow"> <function>fetchRow</function> </link> </para> </refsect1> </refentry> <!-- 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-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t 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 --> Index: peardoc/en/package/database/mdb/mdb-common/fetchone.xml +++ peardoc/en/package/database/mdb/mdb-common/fetchone.xml <!-- $Revision: 1.1 $ --> <refentry id="package.database.mdb.mdb-common.fetchone"> <refnamediv> <refname>MDB_Common::fetchOne()</refname> <refpurpose>fetch the first column of the first row</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'MDB.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>&fetchOne</function> </funcdef> <paramdef>resource <parameter>$result</parameter> </paramdef> <paramdef> string <parameter> <optional>$type = NULL</optional> </parameter> </paramdef> <paramdef> array <parameter> <optional>$params = array()</optional> </parameter> </paramdef> <paramdef> array <parameter> <optional>$param_types = NULL</optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.mdb.mdb-common.fetchone.desc"> &title.desc; <para> Fetch the first column of the first row of data returned from a result set and free the result set. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.resource; <parameter>$result</parameter> </term> <listitem> <para> a valid resource returned by <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> or <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$params</parameter> </term> <listitem> <para> if supplied, <link linkend="package.database.mdb.intro-execute"> <function>prepare</function>/ <function>execute</function> </link> will be used with this array as execute parameters </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$param_types</parameter> </term> <listitem> <para> if supplied, the values in $param will automatically set to the passed datatypes </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.return"> &title.returns; <para> <parameter>mixed</parameter> - the returned value or a &class.mdb-error;, if fail </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>every other error code</entry> <entry/> <entry> Database specific error </entry> <entry> Check the database related section of <ulink url="www.php.net/manual/">PHP-Manual</ulink> to detect the reason for this error. In the most cases a misformed SQL statment. Ie. using LIMIT in a SQL-Statment for an Oracle database. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchone.see"> &title.see; <para> <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> </link>, <link linkend="package.database.mdb.mdb-common.limitquery"> <function>limitQuery</function> </link>, <link linkend="package.database.mdb.mdb-common.prepare"> <function>prepare</function> </link>, <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </link>, <link linkend="package.database.mdb.mdb-common.fetchrow"> <function>fetchRow</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchcol"> <function>fetchCol</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchone"> <function>fetchCol</function> </link> </para> </refsect1> </refentry> <!-- 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-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t 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 --> Index: peardoc/en/package/database/mdb/mdb-common/fetchcol.xml +++ peardoc/en/package/database/mdb/mdb-common/fetchcol.xml <!-- $Revision: 1.1 $ --> <refentry id="package.database.mdb.mdb-common.fetchcol"> <refnamediv> <refname>MDB_Common::fetchCol()</refname> <refpurpose>Fetch a single column</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'MDB.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>&fetchCol</function> </funcdef> <paramdef>resource <parameter>$result</parameter> </paramdef> <paramdef> string <parameter> <optional>$type = NULL</optional> </parameter> </paramdef> <paramdef> mixed <parameter> <optional>$colnum = 0</optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.mdb.mdb-common.fetchcol.desc"> &title.desc; <para> Fetch a single column from a result set of a result set and free the result set. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.resource; <parameter>$result</parameter> </term> <listitem> <para> a valid resource returned by <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> or <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$params</parameter> </term> <listitem> <para> if supplied, <link linkend="package.database.mdb.intro-execute"> <function>prepare</function>/ <function>execute</function> </link> will be used with this array as execute parameters </para> </listitem> </varlistentry> <varlistentry> <term> &type.array; <parameter>$param_types</parameter> </term> <listitem> <para> if supplied, the values in $param will automatically set to the passed datatypes </para> </listitem> </varlistentry> <varlistentry> <term> &type.mixed; <parameter>$colnum</parameter> </term> <listitem> <para> which column to return (integer [column number, starting at 0] or string [column name]) </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.return"> &title.returns; <para> <parameter>array</parameter> - the first row of results as an array indexed from 0 or a &class.mdb-error;, if fail </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> <constant>MDB_ERROR_TRUNCATED</constant> </entry> <entry> <constant>null</constant> </entry> <entry> The result set contains fewer then two columns </entry> <entry> Check the SQL query or choose another <function>query*</function> function </entry> </row> <row> <entry>every other error code</entry> <entry/> <entry> Database specific error </entry> <entry> Check the database related section of <ulink url="www.php.net/manual/">PHP-Manual</ulink> to detect the reason for this error. In the most cases a misformed SQL statment. Ie. using LIMIT in a SQL-Statment for an Oracle database. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchcol.see"> &title.see; <para> <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> </link>, <link linkend="package.database.mdb.mdb-common.limitquery"> <function>limitQuery</function> </link>, <link linkend="package.database.mdb.mdb-common.prepare"> <function>prepare</function> </link>, <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchrow"> <function>fetchRow</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchone"> <function>fetchOne</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchall"> <function>fetchAll</function> </link> </para> </refsect1> </refentry> <!-- 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-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t 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 --> Index: peardoc/en/package/database/mdb/mdb-common/fetchall.xml +++ peardoc/en/package/database/mdb/mdb-common/fetchall.xml <!-- $Revision: 1.1 $ --> <refentry id="package.database.mdb.mdb-common.fetchall"> <refnamediv> <refname>MDB_Common::fetchAll()</refname> <refpurpose>fetch result set as a nested array</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'MDB.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>&fetchAll</function> </funcdef> <paramdef>resource <parameter>$result</parameter> </paramdef> <paramdef> array <parameter> <optional>$types = NULL</optional> </parameter> </paramdef> <paramdef>integer <parameter> <optional>$fetchmode = <constant>MDB_FETCHMODE_DEFAULT</constant> </optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.mdb.mdb-common.fetchall.desc"> &title.desc; <para> Fetch the entire result set of a result set and return it into a nested array and free the result set. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.parameter"> &title.param; <para> <variablelist> <varlistentry> <term> &type.resource; <parameter>$result</parameter> </term> <listitem> <para> a valid resource returned by <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> or <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </para> </listitem> </varlistentry> <varlistentry> <term> &type.int; <parameter>$fetchmode</parameter> </term> <listitem> <para> the fetch mode to use </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.return"> &title.returns; <para> <parameter>array</parameter> - an nested array or a &class.mdb-error;, if fail. </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> <constant>MDB_ERROR_TRUNCATED</constant> </entry> <entry> <constant>null</constant> </entry> <entry> The result set contains fewer then two columns </entry> <entry> Check the SQL fetch or choose another <function>fetch*</function> function </entry> </row> <row> <entry>every other error code</entry> <entry/> <entry> Database specific error </entry> <entry> Check the database related section of <ulink url="www.php.net/manual/">PHP-Manual</ulink> to detect the reason for this error. In the most cases a misformed SQL statment. Ie. using LIMIT in a SQL-Statment for an Oracle database. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.database.mdb.mdb-common.fetchall.see"> &title.see; <para> <link linkend="package.database.mdb.mdb-common.query"> <function>query</function> </link>, <link linkend="package.database.mdb.mdb-common.limitquery"> <function>limitQuery</function> </link>, <link linkend="package.database.mdb.mdb-common.prepare"> <function>prepare</function> </link>, <link linkend="package.database.mdb.mdb-common.execute"> <function>execute</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchrow"> <function>fetchRow</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchone"> <function>fetchOne</function> </link> ,<link linkend="package.database.mdb.mdb-common.fetchcol"> <function>fetchCol</function> </link> </para> </refsect1> </refentry> <!-- 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-executeMultiple-attributes:t sgml-indent-step:1 sgml-indent-data:t 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 -->