Re: FAQ error - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: FAQ error
Date
Msg-id Pine.LNX.4.30.0110132021030.643-100000@peter.localdomain
Whole thread Raw
In response to Re: FAQ error  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: FAQ error
List pgsql-hackers
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.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: EXTRACT broken
Next
From: Tom Lane
Date:
Subject: Re: EXTRACT broken