protected function _fetchArrayList($result, $key = '')
    {
        $array = array();
        while ($row = $result->fetch_assoc()) {
            if ($key) {
                $array[$row[$key]] = $row;
            } else {
                $array[] = $row;
            }
        }

        $result->free();

        return $array;
    }