use prepare_cached() function

--Raju


-----Original Message-----
From: Kipp, James [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 11:09 AM
To: [EMAIL PROTECTED]
Subject: Inserting Multiple values


Hello

I am quite new to DBI and I am learning from the Perl DBI Book. It does not
cover inserting data in detail. I am just wondering the best way to insert
many values into a field. I know it is something like:

$dbh->prepare( "INSERT INTO tbl_people ( lastname ) VALUES (?)" );

How do I have it iterate through an array of names ?

foreach $name (qw( Smith Jones Roberts Johsnon Fredericks) ) {
        sth->execute($name);
}

Thank You 

Reply via email to