mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Some edit
This commit is contained in:
1 parent
cdcddffc69
commit
61a1b5057c
4 files changed
+179
-37
No files matched your search
@@ -25,9 +25,9 @@ class SubDeviceManager
|
||||
}
|
||||
}
|
||||
|
||||
public static function getSubDeviceByMasterAndType($deviceId, $subDeviceType = null)
|
||||
public static function getSubDeviceByMasterAndType($deviceId, $subDeviceType = '')
|
||||
{
|
||||
if (!empty($subDeviceType)) {
|
||||
if ($subDeviceType == '') {
|
||||
return Db::loadOne("SELECT * FROM subdevices WHERE device_id = ?;", array($deviceId));
|
||||
} else {
|
||||
return Db::loadOne("SELECT * FROM subdevices WHERE device_id = ? AND type = ?;", array($deviceId, $subDeviceType));
|
||||
|
||||
Reference in new issue
Block a user