cvs: peardoc /en/core db.xml

From: Date: Tue, 12 Feb 2002 18:19:06 +0000
Subject: cvs: peardoc /en/core db.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-2409@lists.php.net to get a copy of this message
mj Tue Feb 12 13:19:06 2002 EDT Modified files: /peardoc/en/core db.xml Log: * Move DB_Result::tableInfo() to the right place. Index: peardoc/en/core/db.xml diff -u peardoc/en/core/db.xml:1.16 peardoc/en/core/db.xml:1.17 --- peardoc/en/core/db.xml:1.16 Sun Feb 10 18:00:43 2002 +++ peardoc/en/core/db.xml Tue Feb 12 13:19:06 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <reference id="core.db"> <title>PEAR DB: a unified API for accessing SQL-databases</title> <titleabbrev>DB</titleabbrev> @@ -1812,106 +1812,6 @@ </refsect1> </refentry> - <refentry id="core.db.tableinfo"> - <refnamediv> - <refname>DB::tableInfo()</refname> - <refpurpose>returns meta data about the result set</refpurpose> - </refnamediv> - <refsect1 id="core.db.tableinfo.desc"> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>tableInfo</function></funcdef> - <paramdef>DB_Result <parameter>$result</parameter></paramdef> - <paramdef>mode - <parameter><optional>$mode</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - Parameter - <itemizedlist> - <listitem> - <para> - <parameter>$result</parameter> - the result object to analyse - </para> - </listitem> - <listitem> - <para> - <parameter>$mode</parameter> - depends on database implementation - <itemizedlist> - <listitem> - <para> - FrontBase, MS-SQL, MySQL, PostgreSQL - <itemizedlist> - <listitem><para><parameter>false</parameter> (default) - returns this array - <programlisting> - <![CDATA[ -[0]["table"] table name -[0]["name"] field name -[0]["type"] field type -[0]["len"] field length -[0]["flags"] field flags - ]]> - </programlisting> - </para> - </listitem> - <listitem><para><parameter>DB_TABLEINFO_ORDER</parameter> - returns this array - <programlisting> - <![CDATA[ -["num_fields"] number of metadata records -[0]["table"] table name -[0]["name"] field name -[0]["type"] field type -[0]["len"] field length -[0]["flags"] field flags -["order"][field name] index of field named "field name" - ]]> - </programlisting> - The last one is used, if you have a field name, but no index. - Test: if (isset($result['meta']['myfield'])) { ... - </para> - </listitem> - <listitem><para><parameter>DB_TABLEINFO_ORDERTABLE</parameter> - returns the same as above. But additionally - <programlisting> - <![CDATA[ -["ordertable"][table name][field name] index of field named "field name" - ]]> - </programlisting> - This is, because if you have fields from different - tables with the same field name * they override each - other with <parameter>DB_TABLEINFO_ORDER</parameter>. - </para> - </listitem> - </itemizedlist> - </para> - </listitem> - <listitem> - <para> - InterBase, Informix, mSQL, Oracle8, ODBC, Sybase - No information - </para> - </listitem> - </itemizedlist> - </para> - </listitem> - </itemizedlist> - </para> - <para> - Returns - <itemizedlist> - <listitem> - <para> - <parameter>mixed</parameter> - the result of the dropping query - or <classname>DB_Error</classname> when fail - </para> - </listitem> - </itemizedlist> - </para> - </refsect1> - </refentry> - <refentry id="core.db.getlistof"> <refnamediv> <refname>DB::getListOf()</refname> @@ -2179,6 +2079,106 @@ </para> </refsect1> </refentry> + + <refentry id="core.db.tableinfo"> + <refnamediv> + <refname>DB_Result::tableInfo()</refname> + <refpurpose>returns meta data about the result set</refpurpose> + </refnamediv> + <refsect1 id="core.db.tableinfo.desc"> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>tableInfo</function></funcdef> + <paramdef>DB_Result <parameter>$result</parameter></paramdef> + <paramdef>mode + <parameter><optional>$mode</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + Parameter + <itemizedlist> + <listitem> + <para> + <parameter>$result</parameter> - the result object to analyse + </para> + </listitem> + <listitem> + <para> + <parameter>$mode</parameter> - depends on database implementation + <itemizedlist> + <listitem> + <para> + FrontBase, MS-SQL, MySQL, PostgreSQL + <itemizedlist> + <listitem><para><parameter>false</parameter> (default) + returns this array + <programlisting> + <![CDATA[ +[0]["table"] table name +[0]["name"] field name +[0]["type"] field type +[0]["len"] field length +[0]["flags"] field flags + ]]> + </programlisting> + </para> + </listitem> + <listitem><para><parameter>DB_TABLEINFO_ORDER</parameter> + returns this array + <programlisting> + <![CDATA[ +["num_fields"] number of metadata records +[0]["table"] table name +[0]["name"] field name +[0]["type"] field type +[0]["len"] field length +[0]["flags"] field flags +["order"][field name] index of field named "field name" + ]]> + </programlisting> + The last one is used, if you have a field name, but no index. + Test: if (isset($result['meta']['myfield'])) { ... + </para> + </listitem> + <listitem><para><parameter>DB_TABLEINFO_ORDERTABLE</parameter> + returns the same as above. But additionally + <programlisting> + <![CDATA[ +["ordertable"][table name][field name] index of field named "field name" + ]]> + </programlisting> + This is, because if you have fields from different + tables with the same field name * they override each + other with <parameter>DB_TABLEINFO_ORDER</parameter>. + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + <listitem> + <para> + InterBase, Informix, mSQL, Oracle8, ODBC, Sybase - No information + </para> + </listitem> + </itemizedlist> + </para> + </listitem> + </itemizedlist> + </para> + <para> + Returns + <itemizedlist> + <listitem> + <para> + <parameter>mixed</parameter> - the result of the dropping query + or <classname>DB_Error</classname> when fail + </para> + </listitem> + </itemizedlist> + </para> + </refsect1> + </refentry> <refentry id="core.db.dberror"> <refnamediv>

« previous php.pear.cvs (#2409) next »