On Tue, 8 Jan 2002 03:27:51 -0500
Terrence Brannon <[EMAIL PROTECTED]> wrote:
> 
> where is line 74?
> 

Line 74 is $sth->execute(); It is the execute line inside the of my bind/for loop.

On Tue, 8 Jan 2002 11:01:28 +0000
Tim Bunce <[EMAIL PROTECTED]> wrote:

> Not reading your code before posting it:
> 
> >   my $sth100->prepare( "SELECT TABLELISTSEQ FROM db2inst1.SWP_TABLELIST WHERE 
>TABLELIST = $quote_listvalues" );
> 
> Tim.
I am very sorry if I am totally confused about what I am doing but the reason that I 
have $sth100 is to get the primary key from one table to work as the foreign key for 
my bound $sth statement.


I orignally had it combined with my $sth prepare statement but it didn't work so I 
tried several different ways of doing thing to test the individual parts of my 
statement.  This is what I originally tried:

my $sth->prepare( "INSERT INTO db2inst1.SWP_LINKTABLELIST( LINKTABLELISTSEQ, 
TABLELISTSEQ, TRIPSEQ, CGIORDER )
                   VALUES (?, (SELECT TABLELISTSEQ FROM db2inst1.SWP_TABLELIST WHERE 
TABLELIST = ?), ?, ?)" );

 for( my $i=0; $i <= @listvalues; $i++ ) {
           $tabseq = $seqlist[$i+1];    
           $order = $i + 1;
           $instval = 1;
           $tablist =  $listvalues[$i];
           $sth->bind_param( 1, \$tabseq );
           $sth->bind_param( 2, \$tablist );
           $sth->bind_param( 3, \$seqlist[0] );
           $sth->bind_param( 4, \$order );
           $sth->execute();
 }

Again I am very sorry If I entirely missed what you were trying to tell me.

Bobby

Reply via email to