Beispiel #1
0
function updateDBConnection(DB_Connection $conn)
{
    global $config_db, $user;
    if ($conn->validateKey()) {
        if (checkDBConnectionTable()) {
            $sql = "UPDATE db_connections SET " . "Name = '" . $conn->getName() . "', " . "Desc = '" . $conn->getDesc() . "', " . "Server = '" . $conn->getServer() . "', " . "User = '******', " . "Password = '******', " . "Schema = '" . $conn->getSchema() . "', " . "Type = " . $conn->getType() . ", " . "updateDate = '" . date("Y-m-d") . "', " . "updatedBy = '" . $user->getEmail() . "'" . " WHERE id = " . $conn->getID();
            // Execute SQL
            $config_db->exec($sql);
            // Reload Database Connections
            loadDBConnections();
        }
    }
}