public function currval($table, $pkey){
        $stmt = $this->query("SELECT currval('{$table}_{$pkey}_seq')");

        if (!$stmt)
            return false;

        $ret = $stmt->fetch(PDO::FETCH_NUM);
        if (!$ret){
            $stmt = null;
            return false;
        }

        $stmt = null;
        return $ret[0];
    }
public function currval($table, $pkey){
        $stmt = $this->query("SELECT currval('{$table}_{$pkey}_seq')");

        if (!$stmt)
            return false;

        $ret = $stmt->fetch(PDO::FETCH_NUM);
        if (!$ret){
            $stmt = null;
            return false;
        }

        $stmt = null;
        return $ret[0];
    }
public function currval ( $ table , $ pkey ) { $ stmt = $ this -> query ( "SELECT currval('{$table}_{$pkey}_seq')" ) ; if ( ! $ stmt ) return false ; $ ret = $ stmt -> fetch ( PDO :: FETCH_NUM ) ; if ( ! $ ret ) { $ stmt = null ; return false ; } $ stmt = null ; return $ ret [ 0 ] ; }
Return current sequence.

@param string $table
Return current sequence .