On Thu, May 31, 2001 at 03:41:10PM -0500, Michael Wray wrote:
> I just want to insert some values into a table which happen to contain the '
> character as part of the value.....the data in question being a log of SQL
> statements.....

Use either placeholders or $dbh->quote().  (But not both at once.  :)

Here's an example of placeholders:

my $sql = <<"EndOfSQL";
  INSERT INTO mytable
    ( id, name, description )
  VALUES
    ( ?, ?, ? )
EndOfSQL

my $sth = $dbh->prepare($sql);

$sth->execute($id, $name, $desc);

Ronald

Reply via email to