From 3d3f8d3832921f99daf8ce1953304763c2e76c62 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 14 Apr 2006 06:22:09 +0000 Subject: Importing SQLMap + sample + docs. --- framework/DataAccess/adodb/rsfilter.inc.php | 61 +++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 framework/DataAccess/adodb/rsfilter.inc.php (limited to 'framework/DataAccess/adodb/rsfilter.inc.php') diff --git a/framework/DataAccess/adodb/rsfilter.inc.php b/framework/DataAccess/adodb/rsfilter.inc.php new file mode 100644 index 00000000..eb4cd776 --- /dev/null +++ b/framework/DataAccess/adodb/rsfilter.inc.php @@ -0,0 +1,61 @@ + $v) { + $arr[$k] = ucwords($v); + } + } + $rs = RSFilter($rs,'do_ucwords'); + */ +function &RSFilter($rs,$fn) +{ + if ($rs->databaseType != 'array') { + if (!$rs->connection) return false; + + $rs = &$rs->connection->_rs2rs($rs); + } + $rows = $rs->RecordCount(); + for ($i=0; $i < $rows; $i++) { + if (is_array ($fn)) { + $obj = $fn[0]; + $method = $fn[1]; + $obj->$method ($rs->_array[$i],$rs); + } else { + $fn($rs->_array[$i],$rs); + } + + } + if (!$rs->EOF) { + $rs->_currentRow = 0; + $rs->fields = $rs->_array[0]; + } + + return $rs; +} +?> \ No newline at end of file -- cgit v1.2.3