|
|
@@ -55,8 +55,8 @@ $rowset = $bugs->fetchAll("bug_status = 'NEW'");
|
|
|
A legitimate query returns zero rows when no rows in the database match the query
|
|
|
conditions. Therefore, a Rowset object might contain zero Row objects. Since
|
|
|
<classname>Zend_Db_Table_Rowset_Abstract</classname> implements the
|
|
|
- <code>Countable</code> interface, you can use <methodname>count()</methodname> to
|
|
|
- determine the number of Rows in the Rowset.
|
|
|
+ <classname>Countable</classname> interface, you can use <methodname>count()</methodname>
|
|
|
+ to determine the number of Rows in the Rowset.
|
|
|
</para>
|
|
|
|
|
|
<example id="zend.db.table.rowset.rows.counting.example">
|
|
|
@@ -106,10 +106,10 @@ $row = $rowset->current();
|
|
|
|
|
|
<para>
|
|
|
Objects descending from <classname>Zend_Db_Table_Rowset_Abstract</classname>
|
|
|
- implement the <code>SeekableIterator</code> interface, which means you can loop
|
|
|
- through them using the <code>foreach</code> construct. Each value you retrieve this
|
|
|
- way is a <classname>Zend_Db_Table_Row_Abstract</classname> object that corresponds
|
|
|
- to one record from the table.
|
|
|
+ implement the <classname>SeekableIterator</classname> interface, which means you can
|
|
|
+ loop through them using the <methodname>foreach()</methodname> construct. Each value
|
|
|
+ you retrieve this way is a <classname>Zend_Db_Table_Row_Abstract</classname> object
|
|
|
+ that corresponds to one record from the table.
|
|
|
</para>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
@@ -141,11 +141,11 @@ foreach ($rowset as $row) {
|
|
|
<title>Seeking to a known position into a Rowset</title>
|
|
|
|
|
|
<para>
|
|
|
- <code>SeekableIterator</code> allows you to seek to a position that you would like
|
|
|
- the iterator to jump to. Simply use the <methodname>seek()</methodname> method for
|
|
|
- that. Pass it an integer representing the number of the Row you would like your
|
|
|
- Rowset to point to next, don't forget that it starts with index 0. If the index is
|
|
|
- wrong, ie doesn't exist, an exception will be thrown. You should use
|
|
|
+ <classname>SeekableIterator</classname> allows you to seek to a position that you
|
|
|
+ would like the iterator to jump to. Simply use the <methodname>seek()</methodname>
|
|
|
+ method for that. Pass it an integer representing the number of the Row you would
|
|
|
+ like your Rowset to point to next, don't forget that it starts with index 0. If the
|
|
|
+ index is wrong, ie doesn't exist, an exception will be thrown. You should use
|
|
|
<methodname>count()</methodname> to check the number of results before seeking to a
|
|
|
position.
|
|
|
</para>
|
|
|
@@ -195,7 +195,7 @@ $row9->save();
|
|
|
|
|
|
<para>
|
|
|
After you have access to an individual Row object, you can manipulate the Row using
|
|
|
- methods described in <xref linkend="zend.db.table.row" />.
|
|
|
+ methods described in <link linkend="zend.db.table.row" />.
|
|
|
</para>
|
|
|
|
|
|
</sect2>
|