in reply to DBI giving user input by place holders

Firstly you probably don't want to use the variables $a and $b in your code like that, they have special meaning when used in a sort subroutine (which is why they don't provoke an error from 'strict').

The code above appears to only insert one row into the table anyway, I'm not actually sure why you think there should be more than one row.

/J\

  • Comment on Re: DBI giving user input by place holders

Replies are listed 'Best First'.
Re^2: DBI giving user input by place holders
by valavanp (Curate) on Jul 11, 2006 at 12:05 UTC
    i want to insert more rows in my table. i am not able to do with the above coding. Can you please suggest how to do that.

      Assuming you want the same SQL executed, but with different values, you'll need to issue the $sth->execute(...) multiple times. You can do this either by manually repeating that line in your code, or put the line inside a loop of some sort.

      Hope that helps.