protected function query($conn, $sql)
    {
        $items = array();
        if ($conn instanceof PDO) {
            $result = $conn->query($sql);
            if ($result) {
                foreach ($result as $row) {
                    $items[] = $row[0];
                }
            }
        } elseif (is_resource($conn)) {
            $result = sqlsrv_query($conn, $sql);
            if ($result) {
                while ($row = sqlsrv_fetch_array($result, SQLSRV_FETCH_NUMERIC)) {
                    $items[] = $row[0];
                }
            }
        }
        return $items;
    }