function getConfigFunkId($id, $status) { $configDb = new DbTable($_SESSION['config']->DBCONNECT, 'homecontrol_config', array("funk_id", "funk_id2", "control_art"), "", "", "", "id=" . $id); $row = $configDb->getRow(1); if ($row != null) { if ($status == "off" && isFunk2Need($row->getNamedAttribute("control_art"))) { return $row->getNamedAttribute("funk_id2"); } else { return $row->getNamedAttribute("funk_id"); } } return ""; }
function getConfigFunkId($id, $status) { $sqlConfig = "SELECT id, funk_id, funk_id2, control_art FROM homecontrol_config WHERE id=" . $id; $resultConfig = mysql_query($sqlConfig); if ($rowConfig = mysql_fetch_array($resultConfig)) { if ($status == "off" && isFunk2Need($rowConfig["control_art"])) { return $rowConfig["funk_id2"]; } else { return $rowConfig["funk_id"]; } return ""; } }