in reply to MySQL and Perl... Update record Prob
If you are going to use placeholders you might try prepare()ing and then executing queries rather than using do()
my $query = "UPDATE sometable SET someRecord=? WHERE otherRecord=?"; $sth = $dbh->prepare($query); $sth->execute('value1','value2') or die $sth->errstr();
This seems to be the generally more accepted way of doing things if you are using placeholders.
Also I don't think you want single quotes around table and column names
Hope that helps
Chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: MySQL and Perl... Update record Prob
by powerhouse (Friar) on Feb 03, 2003 at 18:06 UTC |