Frustrated with do()
am 22.10.2005 12:33:20 von nvddussenHi,
I'm trying to keep a count of how many times a record was changed.
In the MySQL command line this works perfectly:
UPDATE MyStuff SET cnt=cnt+1,first=7 where last=8;
Field cnt's value is increased by 1 for the correct record.
When I try
$dbh->do("UPDATE MyStuff SET cnt=cnt+1,first=? WHERE last=?", undef, $ff,
$ll);
Field first is updated to $ff for the correct record. However field cnt is
set to 0 (zero).
I can get this behaviour on the MySQL command line with
UPDATE MyStuff SET cnt='cnt+1',first=7 where last=8; (note the quote marks
added)
What is the correct format for the do() statement for what I want to achieve?
Thanks
Nico