[pLog-svn] r5952 - plog/branches/lifetype-1.2/class/database/pdb/drivers
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sat Sep 29 02:54:18 EDT 2007
Author: oscar
Date: 2007-09-29 02:54:18 -0400 (Sat, 29 Sep 2007)
New Revision: 5952
Modified:
plog/branches/lifetype-1.2/class/database/pdb/drivers/pdbrecordset.class.php
Log:
Fixed issue http://bugs.lifetype.net/view.php?id=1400 by adding the missing method PdbRecordSet::GetArray()
Modified: plog/branches/lifetype-1.2/class/database/pdb/drivers/pdbrecordset.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/database/pdb/drivers/pdbrecordset.class.php 2007-09-29 06:46:34 UTC (rev 5951)
+++ plog/branches/lifetype-1.2/class/database/pdb/drivers/pdbrecordset.class.php 2007-09-29 06:54:18 UTC (rev 5952)
@@ -47,5 +47,23 @@
{
return( $this->RecordCount());
}
+
+ /**
+ * Generate a 2-dimensional array of records from the current cursor position, indexed from 0 to $nRows - 1.
+ * If $nRows iundefined, till EOF.
+ *
+ * @param nRows
+ * @return Array
+ */
+ function &GetArray($nRows = -1)
+ {
+ $cnt = 0;
+ $results = array();
+ while ( ($row = $this->FetchRow($this->_dbRes)) && $nRows != $cnt) {
+ $results[] = $row;
+ $cnt++;
+ }
+ return $results;
+ }
}
?>
\ No newline at end of file
More information about the pLog-svn
mailing list