Add ResultSet::rewind()
authorDomas Mituzas <midom@users.mediawiki.org>
Thu, 15 Feb 2007 15:38:28 +0000 (15:38 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Thu, 15 Feb 2007 15:38:28 +0000 (15:38 +0000)
includes/Database.php

index 5ad073d..d295580 100644 (file)
@@ -2116,6 +2116,12 @@ class ResultWrapper {
        function seek( $row ) {
                $this->db->dataSeek( $this->result, $row );
        }
+       
+       function rewind() {
+               if ($this->numRows()) {
+                       $this->db->dataSeek($this->result, 0);
+               }
+       }
 
 }