Php > Databases
Function Query2Array will read an PEAR-DB-Query-Result into an Array
Function Query2Array will read an PEAR-DB-Query-Result into an Array = $result->numRows() ) $skipRows = 0; for ( $i = 1; $i <= $skipRows; $i++) $result->fetchRow(); $Rows = $result->numRows() - $skipRows; if ( $fetchRows >= 0) $Rows = Min($Rows, $fetchRows); $fetchRows = $Rows; for ($i = 0; $i < $fetchRows; $i++ ) { $row = $result->fetchRow(); if ( is_string($keyColumn) ) $retval[$row[$keyColumn]] = $row; else $retval[] = $row; } return $retval; } ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage