public function fetch($query)
    {
        $db = $this->connection();

        if(method_exists($result = $db->query(rtrim(preg_replace('/\s\s/', ' ', $query), ' ')), 'rowCount')) {

            if($result->rowCount() && $result->setFetchMode($db::FETCH_ASSOC)) {

                return $result->fetchAll();
            }

            return false;
        }
    }
public function fetch($query)
    {
        $db = $this->connection();

        if(method_exists($result = $db->query(rtrim(preg_replace('/\s\s/', ' ', $query), ' ')), 'rowCount')) {

            if($result->rowCount() && $result->setFetchMode($db::FETCH_ASSOC)) {

                return $result->fetchAll();
            }

            return false;
        }
    }
public function fetch ( $ query ) { $ db = $ this -> connection ( ) ; if ( method_exists ( $ result = $ db -> query ( rtrim ( preg_replace ( '/\s\s/' , ' ' , $ query ) , ' ' ) ) , 'rowCount' ) ) { if ( $ result -> rowCount ( ) && $ result -> setFetchMode ( $ db :: FETCH_ASSOC ) ) { return $ result -> fetchAll ( ) ; } return false ; } }
Get Data from the table

@param $query String
Get Data from the table