On Thu, 2002-11-14 at 03:40, =F0=CF=D0=CF=D7 =E1=CE=C4=D2=C5=CA wrote:
> Hi.
> I have problem with Postgres.
> I have perl script, that add 2 records in 2 tables. This script I run
> from web throught web server Apache (on FreeBSD).
> (perl version 5.005)
You would be better off using the sequence rather than trying to fetch
out max(obj_id).
select currval('object_list_obj_id_seq') AS nextvalue;
after the insert into object_list.
>=20
> $sth =3D $dbh->prepare("select max(obj_id) from object_list");
> $sth->execute();
> $max =3D $sth->fetchrow;
--=20
Rod Taylor <rbt@rbt.ca>