public function getMaxId()
    {
        $column = $this->getPk();

        return $this->db->select($column)
                        ->from(static::getTableName())
                        ->orderBy($column)
                        ->desc()
                        ->limit(1)
                        ->query($column);
    }
public function getMaxId()
    {
        $column = $this->getPk();

        return $this->db->select($column)
                        ->from(static::getTableName())
                        ->orderBy($column)
                        ->desc()
                        ->limit(1)
                        ->query($column);
    }
public function getMaxId ( ) { $ column = $ this -> getPk ( ) ; return $ this -> db -> select ( $ column ) -> from ( static :: getTableName ( ) ) -> orderBy ( $ column ) -> desc ( ) -> limit ( 1 ) -> query ( $ column ) ; }
Returns maximal id

@return integer
Returns maximal id