New dba functions
This commit is contained in:
parent
7b6664f0f7
commit
d810b21f87
12 changed files with 157 additions and 167 deletions
|
@ -1290,6 +1290,24 @@ class dba {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Fills an array with data from a query
|
||||
*
|
||||
* @param object $stmt statement object
|
||||
* @return array Data array
|
||||
*/
|
||||
static public function inArray($stmt, $do_close = true) {
|
||||
$data = array();
|
||||
while ($row = self::fetch($stmt)) {
|
||||
$data[] = $row;
|
||||
}
|
||||
if ($do_close) {
|
||||
self::close($stmt);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Closes the current statement
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue