in reply to 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!sub exec_add_sql { my $id= $in{'id'}; my $title = $in{'title'}; my $date = $in{'date'}; my $description = $in{'description'}; my $category = $in{'category'}; # connect to the database my $dbh = DBI->connect("DBI:mysql:database:sql.server.com", user, pw); #prepare the query my $sth = $dbh->prepare("insert into postcards(id, title, date, descri +ption, category) values('$id', '$title', '$date', '$description', '$category')"); # execute the query $sth->execute(); $sth->finish(); $dbh->disconnect(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Escaping characters
by rdfield (Priest) on Dec 02, 2002 at 10:04 UTC |