in reply to Re: Escaping characters
in thread Escaping characters
Do you think I should take out the 's from the values part? I will try it right now. Thanks for your help!Nope. Repace the variables that are being interpolated in your prepare statement with question marks (these are the "placeholders" mentioned previously), and add the variable names as parameters to the execute statement. There are plenty of examples in the Tutorials section and the DBI documentation, but in your case the code should be as follows:
my $sth = $dbh->prepare("insert into postcards(id, title, date, descri +ption, category) values (?,?,?,?,?)"); $sth->execute($id, $title, $date, $description, $category);
rdfield
|
|---|