Google API Progress

This commit is contained in:
JonatanRek
2020-04-30 19:40:34 +02:00
parent f588a293ed
commit 8b39b727e1
3 changed files with 133 additions and 17 deletions

View File

@@ -3,8 +3,11 @@ class SubDeviceManager
{
public static $devices;
public static function getAllSubDevices($deviceId)
public static function getAllSubDevices($deviceId = null)
{
if ($deviceId == null){
return Db::loadAll("SELECT * FROM subdevices");
}
return Db::loadAll("SELECT * FROM subdevices WHERE device_id = ?", array($deviceId));
}