Remerge
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
class DeviceModel
|
||||
{
|
||||
public $name = null;
|
||||
@@ -17,6 +18,7 @@ class DeviceModel
|
||||
|
||||
public static function find($data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static function create(array $data)
|
||||
@@ -106,8 +108,8 @@ class DeviceModel
|
||||
$db = FronkDB::singleton();
|
||||
$where = self::getSqlFilter($filter);
|
||||
$res = $db->select("Device", "*", "$where ORDER BY name");
|
||||
if($db->num_rows($res)) {
|
||||
while($data = $db->fetch_object($res)) {
|
||||
if ($db->num_rows($res)) {
|
||||
while ($data = $db->fetch_object($res)) {
|
||||
$items[] = new Device($data);
|
||||
}
|
||||
}
|
||||
@@ -119,9 +121,9 @@ class DeviceModel
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
if(array_key_exists("pop_id", $filter)) {
|
||||
if (array_key_exists("pop_id", $filter)) {
|
||||
$popid = $filter['pop_id'];
|
||||
if(is_numeric($popid)) {
|
||||
if (is_numeric($popid)) {
|
||||
$where .= " AND pop_id=$popid";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user