Added Preorder Export

This commit is contained in:
Frank Schubert
2023-03-09 19:06:32 +01:00
parent 88dbea9f79
commit 852be346ec
5 changed files with 131 additions and 6 deletions

View File

@@ -232,7 +232,7 @@ class PreorderModel {
return 0;
}
public static function search($filter, $limit = false) {
public static function search($filter, $limit = false, $returnDBRessource = false) {
$items = [];
$db = FronkDB::singleton();
@@ -257,6 +257,12 @@ class PreorderModel {
$res = $db->query($sql);
if($db->num_rows($res)) {
// hack for Preorder::exportAction
if($returnDBRessource) {
return $res;
}
while($data = $db->fetch_object($res)) {
$items[] = new Preorder($data);
}