Frustrated with do()
- From: nvddussen@xxxxxxxxxx (Nico van der Dussen)
- Date: Sat, 22 Oct 2005 12:33:20 +0200
Hi,
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
.
- Follow-Ups:
- Re: Frustrated with do()
- From: Otavio
- Re: Frustrated with do()
- Prev by Date: Re: MS Access, scripts clashing
- Next by Date: Re: DBD::Oracle for Oracle instantclient 10
- Previous by thread: dbd::informix with no test db
- Next by thread: Re: Frustrated with do()
- Index(es):