in reply to (ar0n: use placeholders) Re: text entry into mysql using perl
in thread text entry into mysql using perl

I did what you said
$sth = $dbh->prepare("INSERT INTO press_releases (time,date,ticker,hea +der,body) VALUES (?,?,?,?,?);"); $sth->execute($time, $date, $ticker, $header, $body);
which worked beautifully. Only thing is it worked twice, so I got the same thing written into the database two times. Did I do something wrong?

Replies are listed 'Best First'.
(ar0n) Re (2): (ar0n: use placeholders) Re: text entry into mysql using perl
by ar0n (Priest) on Apr 16, 2001 at 05:50 UTC
    Only thing is it worked twice, so I got the same thing written into the database two times. Did I do something wrong?
    Most likely. Are you using this in a loop? The statements above work fine.

    ar0n ]