cvs: peardoc /en/package/database/mdb-querytool api.xml
| From: | Lorenzo Alberton | Date: | Sun, 27 Feb 2005 20:25:11 +0000 |
| Subject: | cvs: peardoc /en/package/database/mdb-querytool api.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5586@lists.php.net to get a copy of this message | ||
quipo Sun Feb 27 15:25:11 2005 EDT
Modified files:
/peardoc/en/package/database/mdb-querytool api.xml
Log:
escape single quotes
http://cvs.php.net/diff.php/peardoc/en/package/database/mdb-querytool/api.xml?r1=1.1&r2=1.2&ty=u
Index: peardoc/en/package/database/mdb-querytool/api.xml
diff -u peardoc/en/package/database/mdb-querytool/api.xml:1.1
peardoc/en/package/database/mdb-querytool/api.xml:1.2
--- peardoc/en/package/database/mdb-querytool/api.xml:1.1 Sun Feb 27 14:16:07 2005
+++ peardoc/en/package/database/mdb-querytool/api.xml Sun Feb 27 15:25:11 2005
@@ -1,9 +1,10 @@
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="package.database.mdb-querytool.api">
<refnamediv>
<refname>Quick API reference</refname>
<refpurpose>
- An OO-interface for easily retreiving and modifying data in a DB
+ A quick overview of the available methods. Please refer to the full
+ API docs for a detailed documentation.
</refpurpose>
</refnamediv>
<refsect1 id="package.database.mdb-querytool.api.methodlist">
@@ -60,7 +61,7 @@
$ids = $table->getCol('id');
]]>
</programlisting>
- so ids will be an array with all the id's.
+ so ids will be an array with all the id's.
</para>
</listitem>
<listitem>
@@ -159,7 +160,7 @@
<para>
Add a where-like clause which works like a search for the given string;
i.e. calling it like this:
- <programlisting role="php">$this->addWhereSearch('name',
'otto hans')</programlisting>
+ <programlisting
role="php">$this->addWhereSearch('name', 'otto
hans')</programlisting>
produces a where clause like this one
<programlisting>UPPER(name) LIKE "%OTTO%HANS%"</programlisting>
so the search finds the given string.
@@ -215,12 +216,16 @@
adds a table and a where clause that shall be used for the join
instead of calling
<programlisting role="php">
- setJoin(array(table1,table2),'<where clause1> AND <where clause2>');
+<![CDATA[
+setJoin(array(table1, table2), '<where clause1> AND <where clause2>');
+]]>
</programlisting>
you can also call
<programlisting role="php">
- setJoin(table1,'<where clause1>');
- addJoin(table2,'<where clause2>');
+<![CDATA[
+setJoin(table1,'<where clause1>');
+addJoin(table2,'<where clause2>');
+]]>
</programlisting>
</para>
</listitem>
@@ -271,7 +276,7 @@
<listitem>
<para>setOption($option, $value)</para>
<para>
- Set mode the class shall work in. The 'raw' mode does not quote the data
+ Set mode the class shall work in. The 'raw' mode does not quote the data
before building the query
</para>
</listitem>
@@ -312,27 +317,27 @@
<para>
Format the result to be indexed by <parameter>key</parameter>.
NOTE: be careful, when using this you should be aware, that if you
- use an index which's value appears multiple times you may loose data
- since a key can't exist multiple times!
+ use an index which's value appears multiple times you may loose data
+ since a key can't exist multiple times!
The result for a result to be indexed by a key(=columnName)
- (i.e. 'relationtoMe') which's values are 'brother' and
'sister'
- or alike normally returns this:
+ (i.e. 'relationtoMe') which's values are
'brother'
+ and 'sister' or alike normally returns this:
<programlisting role="php">
<![CDATA[
$res['brother'] = array('name' => 'xxx');
$res['sister'] = array('name' => 'xxx');
]]>
</programlisting>
- but if the column 'relationtoMe' contains multiple entries for
'brother'
- then the returned dataset will only contain one brother, since the
- value from the column 'relationtoMe' is used
- and which 'brother' you get depends on a lot of things, like the sort order,
- how the db saves the data, and whatever else.
+ but if the column 'relationtoMe' contains multiple entries for
+ 'brother' then the returned dataset will only contain one brother,
+ since the value from the column 'relationtoMe' is used
+ and which 'brother' you get depends on a lot of things,
+ like the sort order, how the db saves the data, and whatever else.
You can also set indexes which depend on 2 columns, simply pass the parameters
- like 'table1.id,table2.id' it will be used as a string for indexing the result
- and the index will be built using the 2 values given, so a possible
- index might be '1,2' or '2108,29389' this way you can access data which
- have 2 primary keys. Be sure to remember that the index is a string!
+ like 'table1.id,table2.id' it will be used as a string for indexing
+ the result and the index will be built using the 2 values given, so a possible
+ index might be '1,2' or '2108,29389' this way you can
access
+ data which have 2 primary keys. Be sure to remember that the index is a string!
</para>
</listitem>
<listitem>
@@ -341,7 +346,10 @@
</listitem>
<listitem>
<para>useResult($type)</para>
- <para>Choose the type of the returned result ('array', 'object',
'none')</para>
+ <para>
+ Choose the type of the returned result
+ ('array', 'object', 'none')
+ </para>
</listitem>
<listitem>
<para>setErrorCallback($param)</para>