The reporting of two rows thing is to do with how MySQL handles
INSERT ... ON DUPLICATE KEY UPDATE ... statements; it will report 1 row
if it inserts, and 2 rows if it finds a duplicate key and has to update
Just after the first code box.
On Wed, 2009-01-21 at 21:44 -0700, Ashley M. Kirchner wrote:
> Michael Dykman wrote:
> > It
> > worked fine as you wrote it on my v5.0.45, although it reported 2 rows
> > affected on each subsequent run of the insert statement. I thought
> > this odd as I only ran the same statement repeatedly leaving me with
> > one row ever, but the value updated just fine.
> I noticed that too. It reports 2 rows, but there's only 1. That
> was my first indication that something's awry. But then when I tried it
> on 5.1.30, it did the same thing, 2 rows. But at least it DID update on
> 5.1.30, but not on 5.0.37.