Mar 3, 2003, 9:42 PM
Post #5 of 5
Another method, the one I use:
Re: [Paul] HTML in mySQL (what to do with " and ')
[In reply to]
my $sth = $dbh->prepare("INSERT INTO sometable (yeah,whatever) VALUES(?,?) || die(DBI->errstr);
$sth->execute($valueForYeahField,$valueForWhateverField) || die(DBI->errstr);
Preparing the statement also allows you to execute it multiple times. So, inbetween the prepare and finish, for example, you could execute the query 10 different times, each time with different values, while looping through a block.