mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Repair sort and get value wifi connection
This commit is contained in:
1 parent
20469c65db
commit
c75c67d420
3 files changed
+63
-37
No files matched your search
@@ -3,7 +3,8 @@ class DeviceManager{
|
||||
public static $devices;
|
||||
|
||||
static function getAllDevices () {
|
||||
return Db::loadAll ("SELECT * FROM devices WHERE approved != ?", Array(2));
|
||||
return Db::loadAll ("SELECT devices.* FROM devices
|
||||
WHERE approved != ?", Array(2));
|
||||
}
|
||||
|
||||
static function getAllDevicesInRoom ($roomId = "") {
|
||||
@@ -27,7 +28,9 @@ class DeviceManager{
|
||||
}
|
||||
|
||||
static function getAllDevicesSorted ($sort, $sortType = "ASC") {
|
||||
return Db::loadAll ("SELECT devices.* FROM devices LEFT JOIN rooms ON devices.room_id = rooms.room_id WHERE devices.approved != ? ORDER BY $sort $sortType", Array(2));
|
||||
return Db::loadAll ("SELECT devices.* FROM devices
|
||||
LEFT JOIN rooms ON (devices.room_id = rooms.room_id)
|
||||
WHERE devices.approved != ? ORDER BY $sort $sortType", Array(2));
|
||||
}
|
||||
|
||||
public static function create ($name, $token) {
|
||||
|
||||
Reference in new issue
Block a user