> Obviously, someone did because they tried the code and it didn't work.
> At least the new code is closer to valid, though less clear. It is at
> least a valid snippet, which the previous version was not.
OK, I changed it to more pseudocode:
new_id = output of "SELECT nextval('person_id_s
> 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');
>
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 = $db
> 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 i
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 kno
> On 10 Oct 2001 at 17:12 (-0400), Bruce Momjian wrote:
> |
> | Our FAQ, item 4.16.2 has:
> |
> | $newSerialID = nextval('person_id_seq');
> | INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
> |
> | Is this correct Perl? I don't see a nextval() function in Perl.
Bruce Momjian writes:
> Our FAQ, item 4.16.2 has:
>
> $newSerialID = nextval('person_id_seq');
> INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
>
> Is this correct Perl?
No. I always thought it was pseudo code. I think it's fine.
--
Peter Eisentraut [EMAI
Bruce Momjian wrote:
> $newSerialID = nextval('person_id_seq');
> INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
>
> Is this correct Perl? I don't see a nextval() function in Perl. Can
> you call SQL server-side functions natively from Perl?
Ofcourse not
On 10 Oct 2001 at 17:12 (-0400), Bruce Momjian wrote:
|
| Our FAQ, item 4.16.2 has:
|
| $newSerialID = nextval('person_id_seq');
| INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
|
| Is this correct Perl? I don't see a nextval() function in Perl. Can
| you ca
Our FAQ, item 4.16.2 has:
$newSerialID = nextval('person_id_seq');
INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal');
Is this correct Perl? I don't see a nextval() function in Perl. Can
you call SQL server-side functions natively from Perl?
--
Bruce Momj
10 matches
Mail list logo