public function lastId($field = null) {
        try {
            $this->checkDialect();
        } catch (\Exception $e) {
            $this->error = $e->getMessage();

            return 0;
        }

        return $this->dialect->lastInsertId($field);
    }
public function lastId($field = null) {
        try {
            $this->checkDialect();
        } catch (\Exception $e) {
            $this->error = $e->getMessage();

            return 0;
        }

        return $this->dialect->lastInsertId($field);
    }
public function lastId ( $ field = null ) { try { $ this -> checkDialect ( ) ; } catch ( \ Exception $ e ) { $ this -> error = $ e -> getMessage ( ) ; return 0 ; } return $ this -> dialect -> lastInsertId ( $ field ) ; }
get the last inserted id

@param string $field

@return int
get the last inserted id