final public function getLastPk($table = null)
    {
        if ($table === null) {
            $this->validateShortcutData();
            $table = static::getTableName();
        }

        return $this->db->select()
                        ->max($this->getPk())
                        ->from($table)
                        ->queryScalar();
    }
final public function getLastPk($table = null)
    {
        if ($table === null) {
            $this->validateShortcutData();
            $table = static::getTableName();
        }

        return $this->db->select()
                        ->max($this->getPk())
                        ->from($table)
                        ->queryScalar();
    }
final public function getLastPk ( $ table = null ) { if ( $ table === null ) { $ this -> validateShortcutData ( ) ; $ table = static :: getTableName ( ) ; } return $ this -> db -> select ( ) -> max ( $ this -> getPk ( ) ) -> from ( $ table ) -> queryScalar ( ) ; }
Returns last primary key

@param string $table Optional table name override
@return integer
Returns last primary key