On Thu, 31 Jul 2003 14:21:55 GMT, Ryan Howell <tkup@insightbb.com> wrote:

> #!/usr/bin/perl
>
> use CGI qw(:standard);


Obligatory recommendation that you use strict and -w.



> $dbh = DBI->connect("dbi:Pg:dbname=test",'postgres','');
> $sql = "INSERT INTO personinfo ( fname ) VALUES ('$name1')";
> $rc = $dbh->do($sql);
> $dbh->disconnect;
>
> $item1sn = param("item1sn");
>
> #$dbh = DBI->connect("dbi:Pg:dbname=test",'postgres','');
> $sql2 = "INSERT INTO itemsn ( item1sn ) VALUES ( '$item1sn')";
> $rc = $dbh->do($sql2);
> #$dbh->disconnect;


You can join the strings together with a ';' and send the whole thing as
one sql query.


--
Andy