1
1
Fork 0

mv q() to DBA::p()

This commit is contained in:
Tobias Diekershoff 2019-11-02 12:12:29 +01:00
parent 15cdfdd414
commit 34932e12bf

View file

@ -88,11 +88,10 @@ class UserExport extends BaseSettingsModule
$table = $match[1];
$result = [];
$r = q($query);
if (DBA::isResult($r)) {
foreach ($r as $rr) {
$rows = DBA::p($query);
while ($row = DBA::fetch($rows)) {
$p = [];
foreach ($rr as $k => $v) {
foreach ($row as $k => $v) {
switch ($dbStructure[$table]['fields'][$k]['type']) {
case 'datetime':
$p[$k] = $v ?? DBA::NULL_DATETIME;
@ -104,7 +103,7 @@ class UserExport extends BaseSettingsModule
}
$result[] = $p;
}
}
DBA::close($rows);
return $result;
}