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
as well.
http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
Just after the
Anyone?
I'm trying to diagnose this and not having much luck. I can't even
figure out where to even begin to look. I have two MySQL servers and
getting different results for the same query on both:
SERVER 1:
mysqladmin Ver 8.41 Distrib 5.0.37, for pc-linux-gnu on i686
You might try explicitly formatting your date as the string-type you
are expecting, but it looks to me like it should wokr exactly as you
have it. I would agree with your suspicion about your v5.0.37. It
worked fine as you wrote it on my v5.0.45, although it reported 2 rows
affected on each
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