Bruce Momjian writes:

> > Bruce Momjian writes:
> >
> > > OK, new FAQ code is:
> > >
> > >     $sql = "SELECT nextval('person_id_seq')";
> > >     $newSerialID = ($conn->selectrow_array($sql))[0];
> > >     INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
> > >     $res = $dbh->do($sql);
> >
> > This code is still incorrect for any known programming language and it's
> > even less clear to a person that doesn't know the programming language
> > it's probably trying to imitate.
>
> OK, what suggestions do you have?

I didn't have a problem with the original version.  It conveyed clearly
(to me), "read the nextval and insert it yourself".

-- 
Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to