cvs: peardoc /en/package/database/db-dataobject/db-dataobject selectadd.xml

From: Date: Tue, 09 Jan 2007 19:51:53 +0000
Subject: cvs: peardoc /en/package/database/db-dataobject/db-dataobject selectadd.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-9265@lists.php.net to get a copy of this message
moosh Tue Jan 9 19:51:53 2007 UTC Modified files: /peardoc/en/package/database/db-dataobject/db-dataobject selectadd.xml Log: bug #9786 http://cvs.php.net/viewvc.cgi/peardoc/en/package/database/db-dataobject/db-dataobject/selectadd.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/en/package/database/db-dataobject/db-dataobject/selectadd.xml diff -u peardoc/en/package/database/db-dataobject/db-dataobject/selectadd.xml:1.4 peardoc/en/package/database/db-dataobject/db-dataobject/selectadd.xml:1.5 --- peardoc/en/package/database/db-dataobject/db-dataobject/selectadd.xml:1.4 Tue Dec 5 11:24:19 2006 +++ peardoc/en/package/database/db-dataobject/db-dataobject/selectadd.xml Tue Jan 9 19:51:53 2007 @@ -1,4 +1,5 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> +<!-- $Id: selectadd.xml,v 1.5 2007/01/09 19:51:53 moosh Exp $ --> <refentry id="package.database.db-dataobject.db-dataobject.selectadd"> <refnamediv> <refname>-&gt;selectAdd()</refname> @@ -6,68 +7,75 @@ </refnamediv> <refsynopsisdiv> <funcsynopsis> - + <funcprototype> - <funcdef>void <function>$DB_DataObject-&gt;selectAdd</function></funcdef> - + <funcdef> + void <function>$DB_DataObject-&gt;selectAdd</function> + </funcdef> + <paramdef> string <parameter><optional>$condition</optional></parameter> </paramdef> - + </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.database.db-dataobject.db-dataobject.selectadd.desc"> &title.desc; <para> - Adds a selected columns. By default a select query will request all - items (eg. SELECT * FROM table), to change this behavior - you can first call <function>selectAdd</function> without any arguments to clear the + Adds a selected columns. + + By default a select query will request all items + (eg. SELECT * FROM table), + to change this behavior you can first call + <function>selectAdd</function> + without any arguments to clear the current request and then add the specific items you require. </para> <para> - You can also set up a default selection query by adding SelectAdd() method calls - in the object constructor method (the one with the same name as the class) + You can also set up a default selection query by adding + SelectAdd() method calls in the object constructor method + (the one with the same name as the class) </para> - </refsect1> - + </refsect1> + <refsect1 id="package.database.db-dataobject.db-dataobject.selectadd.parameter"> &title.param; <para> <itemizedlist> - + <listitem> <para> <parameter>resource $key</parameter> - table column name - + </para> - </listitem> - + </listitem> + </itemizedlist> </para> - </refsect1> - - - - + </refsect1> + + + + <refsect1 id="package.database.db-dataobject.db-dataobject.selectadd.note"> - &title.note; - + &title.note; + &note.notstatic; - - - + + + <simpara></simpara> - </refsect1> - + </refsect1> + <refsect1 id="package.database.db-dataobject.db-dataobject.selectadd.example"> &title.example; <example> <title>Using <function>selectAdd</function></title> <programlisting role="php"> - <![CDATA[ + <![CDATA[ $person = new DataObjects_Person; $person->selectAdd(); $person->selectAdd('id,name'); @@ -82,22 +90,22 @@ $person->id = 12; $person->find(TRUE); -echo "$person->name} {$person->birthday_formated}<BR>"; - -]]> +echo "{$person->name} {$person->birthday_formated}<BR>"; + +]]> </programlisting> </example> <example> <title>Resulting SQL</title> <programlisting> - <![CDATA[ + <![CDATA[ SELECT id,name FROM person SELECT *, DATE_FORMAT(birthday,'%d %m %Y') as birthday_formated FROM person WHERE id=12 -]]> +]]> </programlisting> - </example> - </refsect1> + </example> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: @@ -117,4 +125,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +-->

« previous php.pear.doc (#9265) next »