|
|
@@ -1,11 +1,9 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!-- Reviewed: no -->
|
|
|
<sect1 id="zend.db.table.row">
|
|
|
-
|
|
|
<title>Zend_Db_Table_Row</title>
|
|
|
|
|
|
<sect2 id="zend.db.table.row.introduction">
|
|
|
-
|
|
|
<title>Introduction</title>
|
|
|
|
|
|
<para>
|
|
|
@@ -20,11 +18,9 @@
|
|
|
url="http://www.martinfowler.com/eaaCatalog/rowDataGateway.html">Row Data
|
|
|
Gateway</ulink> pattern.
|
|
|
</para>
|
|
|
-
|
|
|
</sect2>
|
|
|
|
|
|
<sect2 id="zend.db.table.row.read">
|
|
|
-
|
|
|
<title>Fetching a Row</title>
|
|
|
|
|
|
<para>
|
|
|
@@ -36,24 +32,21 @@
|
|
|
</para>
|
|
|
|
|
|
<example id="zend.db.table.row.read.example">
|
|
|
-
|
|
|
<title>Example of fetching a row</title>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
$bugs = new Bugs();
|
|
|
$row = $bugs->fetchRow($bugs->select()->where('bug_id = ?', 1));
|
|
|
]]></programlisting>
|
|
|
-
|
|
|
</example>
|
|
|
|
|
|
<para>
|
|
|
A <classname>Zend_Db_Table_Rowset</classname> object contains a collection of
|
|
|
- <classname>Zend_Db_Table_Row</classname> objects. See <xref
|
|
|
- linkend="zend.db.table.rowset" />.
|
|
|
+ <classname>Zend_Db_Table_Row</classname> objects. See the chapter about <link
|
|
|
+ linkend="zend.db.table.rowset">table rowset</link> for details.
|
|
|
</para>
|
|
|
|
|
|
<example id="zend.db.table.row.read.example-rowset">
|
|
|
-
|
|
|
<title>Example of reading a row in a rowset</title>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
@@ -61,11 +54,9 @@ $bugs = new Bugs();
|
|
|
$rowset = $bugs->fetchAll($bugs->select()->where('bug_status = ?', 1));
|
|
|
$row = $rowset->current();
|
|
|
]]></programlisting>
|
|
|
-
|
|
|
</example>
|
|
|
|
|
|
<sect3 id="zend.db.table.row.read.get">
|
|
|
-
|
|
|
<title>Reading column values from a row</title>
|
|
|
|
|
|
<para>
|
|
|
@@ -74,7 +65,6 @@ $row = $rowset->current();
|
|
|
</para>
|
|
|
|
|
|
<example id="zend.db.table.row.read.get.example">
|
|
|
-
|
|
|
<title>Example of reading a column in a row</title>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
@@ -84,11 +74,9 @@ $row = $bugs->fetchRow($bugs->select()->where('bug_id = ?', 1));
|
|
|
// Echo the value of the bug_description column
|
|
|
echo $row->bug_description;
|
|
|
]]></programlisting>
|
|
|
-
|
|
|
</example>
|
|
|
|
|
|
<note>
|
|
|
-
|
|
|
<para>
|
|
|
Earlier versions of <classname>Zend_Db_Table_Row</classname> mapped these column
|
|
|
accessors to the database column names using a string transformation called
|
|
|
@@ -149,21 +137,17 @@ foreach ($rowArray as $column => $value) {
|
|
|
|
|
|
<para>
|
|
|
The <classname>Zend_Db_Table_Row_Abstract</classname> class provides methods for
|
|
|
- fetching rows and rowsets from related tables. See <xref
|
|
|
- linkend="zend.db.table.relationships" /> for more information on table
|
|
|
- relationships.
|
|
|
+ fetching rows and rowsets from related tables. See the <link
|
|
|
+ linkend="zend.db.table.relationships">relationship chapter</link> for more
|
|
|
+ information on table relationships.
|
|
|
</para>
|
|
|
-
|
|
|
</sect3>
|
|
|
-
|
|
|
</sect2>
|
|
|
|
|
|
<sect2 id="zend.db.table.row.write">
|
|
|
-
|
|
|
<title>Writing rows to the database</title>
|
|
|
|
|
|
<sect3 id="zend.db.table.row.write.set">
|
|
|
-
|
|
|
<title>Changing column values in a row</title>
|
|
|
|
|
|
<para>
|
|
|
@@ -645,8 +629,8 @@ class Products extends Zend_Db_Table_Abstract
|
|
|
|
|
|
<para>
|
|
|
<classname>Zend_Db</classname> classes do not implement inflection by default. See
|
|
|
- <xref linkend="zend.db.table.extending.inflection" /> for an explanation of this
|
|
|
- policy.
|
|
|
+ the chapter about <link linkend="zend.db.table.extending.inflection">extending
|
|
|
+ inflection</link> for an explanation of this policy.
|
|
|
</para>
|
|
|
|
|
|
<para>
|