Permalink
Browse files

Update docs/manual/en-US/chapters/packages/database.xml

  • Loading branch information...
1 parent 7e9e119 commit c0057a10db0876e973d88ec35d05e17af826a7e5 @chdemko chdemko committed Mar 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 docs/manual/en-US/chapters/packages/database.xml
@@ -19,7 +19,7 @@
<para>The <code language="PHP (HTML)">JDatabaseIterator</code> class allows iteration over database results
<programlisting language="PHP (HTML)"><![CDATA[$dbo = JFactory::getDbo();
-$iterator = $dbo->getIterator($dbo->getQuery(true)->select('*')->from('#__content')->execute());
+$iterator = $dbo->setQuery($dbo->getQuery(true)->select('*')->from('#__content'))->getIterator();
foreach ($iterator as $row)
{
// Deal with $row

0 comments on commit c0057a1

Please sign in to comment.