htmanning has asked for the wisdom of the Perl Monks concerning the following question:
my $price = "50"; my $htmlvar = "<li>The price is \$$price</li>"; my $sth = $dbh->prepare(qq{UPDATE database SET htmlvar=? WHERE ID=?}); $sth->execute($htmlvar, $ID) or die $dbh->errstr; $sth->finish;
What gets written to the dabase is:
<li>The price is \$$price</li>
How can I have the the database read this:
Thanks.<li>The price is $50<li>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using vars in a var
by GrandFather (Saint) on Nov 02, 2022 at 02:32 UTC | |
by htmanning (Friar) on Nov 02, 2022 at 04:06 UTC | |
by GrandFather (Saint) on Nov 02, 2022 at 05:32 UTC | |
Re: Using vars in a var
by davido (Cardinal) on Nov 02, 2022 at 16:25 UTC | |
Re: Using vars in a var
by afoken (Chancellor) on Nov 02, 2022 at 15:41 UTC |