Order/Form: Changed owner and billingaddress to autocomplete instead of
select
This commit is contained in:
@@ -76,6 +76,21 @@ class AddressModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function getOne($id) {
|
||||
if(!is_numeric($id) || !$id) {
|
||||
throw new Exception("Invalid number", 400);
|
||||
}
|
||||
$item = [];
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$res = $db->select("Address", "*", "id=$id LIMIT 1");
|
||||
if($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
$item = new Address($data);
|
||||
}
|
||||
return $item;
|
||||
}
|
||||
|
||||
public static function getAll() {
|
||||
$items = [];
|
||||
|
||||
@@ -179,7 +194,7 @@ class AddressModel {
|
||||
}
|
||||
}
|
||||
|
||||
//mfLoghandler::singleton()->debug($sql);
|
||||
mfLoghandler::singleton()->debug($sql);
|
||||
|
||||
$res = $db->query($sql);
|
||||
if($db->num_rows($res)) {
|
||||
|
||||
Reference in New Issue
Block a user