= 600, 0, 1) AS status, $sessionField, machine.currentuser, machine.locationid FROM machine $leftJoin WHERE " . $where, array('locationid' => $locationId)); return $res->fetchAll(PDO::FETCH_ASSOC); } /** * Get machines by list of UUIDs * @param string[] $list list of system UUIDs * @return array list of machines with machineuuid, clientip and locationid */ public static function getMachinesByUuid($list) { if (empty($list)) return array(); $res = Database::simpleQuery("SELECT machineuuid, clientip, locationid FROM machine WHERE machineuuid IN (:list)", compact('list')); return $res->fetchAll(PDO::FETCH_ASSOC); } }