Added Admin function mass prouductchange
This commit is contained in:
@@ -50,14 +50,18 @@ class ProductModel {
|
||||
if(!is_numeric($id) || !$id) {
|
||||
throw new Exception("Invalid number", 400);
|
||||
}
|
||||
$item = [];
|
||||
$item = null;
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$res = $db->select("Product", "*", "id=$id LIMIT 1");
|
||||
if($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
$item = new Product($data);
|
||||
$data = $db->fetch_object($res);
|
||||
$item = new Product($data);
|
||||
if(!$item->id) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user