I am converting from Access 2.0 to MySQL and I am going through all of my code to make it compatible with MySQL. I was testing my Update for one of my queries and I don't know if I found a bug or if MySQL was designed to do this.
In my program I pass an UPDATE string to MySQL. There can be times
when there really isn't anything to UPDATE but the string is passed
anyway. In Access it would run the query and just overwrite everything.
In MySQL it does nothing if there are no changes. Here is a sample UPDATE:
UPDATE tblQuotes SET CompanyContact= "George Bush", CompanyName= "Hello There" WHERE (QuoteNumber= 55 AND Revision= "Initial"
If the data in the DB is the same then nothing happens. If I make a change to either of the fields then it updates. Was MySQL designed this way?
Yes.
Depending on your client program, it may be possible to request that UPDATE return a rows-matched count rather than a rows-changed count.
-- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com
MySQL Users Conference: April 14-16, 2004 http://www.mysql.com/uc2004/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]