title: Update in MySQL returning "Rows matched: 1 Changed: 0 Warnings: 0"
body: <p>For some reason, when I do an update on a particular table in MySQL, the response is:</p>
  
  <p>"Rows matched: 1 Changed: 0 Warnings: 0"</p>
  
  <p>I can not for the life of me work out why. I can do a select from the database: (I have X'd out the sensitive data - it's just text)</p>
  
  <pre><code>mysql&gt; SELECT * FROM outgoings WHERE id=198;
  +-----+---------+---------------+------+-----+----------------+-----------------+-----------+------------------------------------+-----------+------------+------------------+---------------------+---------------------+---------------+---------------+-----------+-----------------+---------------------------------+-------------------+---------------------+----------------+
  | id  | user_id | outgoing_date | form | bsb | account_number | transfer_number | amount    | recipient                          | client_id | project_id | purpose          | created_at          | updated_at          | received_from | cheque_number | cheque_to | project_id_from | cheque_drawer                   | recipient_purpose | transferrer_purpose | client_id_from |
  +-----+---------+---------------+------+-----+----------------+-----------------+-----------+------------------------------------+-----------+------------+------------------+---------------------+---------------------+---------------+---------------+-----------+-----------------+---------------------------------+-------------------+---------------------+----------------+
  | 198 |       2 | 2015-03-11    |    3 |     |                |                 | 407481.25 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |       162 |        503 | XXXXXXXXXXXXXXXX | 2015-03-13 17:51:36 | 2015-03-13 17:51:36 |               | 161           |           |            NULL | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |                   |                     |           NULL |
  +-----+---------+---------------+------+-----+----------------+-----------------+-----------+------------------------------------+-----------+------------+------------------+---------------------+---------------------+---------------+---------------+-----------+-----------------+---------------------------------+-------------------+---------------------+----------------+
  1 row in set (0.00 sec)
  </code></pre>
  
  <p>As you can see, the amount column is 407481.25. I then run a simple update query:</p>
  
  <pre><code>mysql&gt; UPDATE cl_time.outgoings SET amount=407481.24 WHERE outgoings.id=198;
  Query OK, 0 rows affected (0.00 sec)
  Rows matched: 1  Changed: 0  Warnings: 0
  </code></pre>
  
  <p>The result shows that nothing was updated, despite the fact that I am actually trying to change something. And if I run the select query again, I see the same result:</p>
  
  <pre><code>mysql&gt; SELECT * FROM outgoings WHERE id=198;
  +-----+---------+---------------+------+-----+----------------+-----------------+-----------+------------------------------------+-----------+------------+------------------+---------------------+---------------------+---------------+---------------+-----------+-----------------+---------------------------------+-------------------+---------------------+----------------+
  | id  | user_id | outgoing_date | form | bsb | account_number | transfer_number | amount    | recipient                          | client_id | project_id | purpose          | created_at          | updated_at          | received_from | cheque_number | cheque_to | project_id_from | cheque_drawer                   | recipient_purpose | transferrer_purpose | client_id_from |
  +-----+---------+---------------+------+-----+----------------+-----------------+-----------+------------------------------------+-----------+------------+------------------+---------------------+---------------------+---------------+---------------+-----------+-----------------+---------------------------------+-------------------+---------------------+----------------+
  | 198 |       2 | 2015-03-11    |    3 |     |                |                 | 407481.25 | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |       162 |        503 | XXXXXXXXXXXXXXXX | 2015-03-13 17:51:36 | 2015-03-13 17:51:36 |               | 161           |           |            NULL | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |                   |                     |           NULL |
  +-----+---------+---------------+------+-----+----------------+-----------------+-----------+------------------------------------+-----------+------------+------------------+---------------------+---------------------+---------------+---------------+-----------+-----------------+---------------------------------+-------------------+---------------------+----------------+
  1 row in set (0.00 sec)
  </code></pre>
  
  <p>For a bit more context, this is the table structure:</p>
  
  <pre><code>CREATE TABLE `outgoings` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` int(11) NOT NULL,
    `outgoing_date` date NOT NULL,
    `form` int(11) NOT NULL,
    `bsb` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `account_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `transfer_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `amount` float(8,2) NOT NULL,
    `recipient` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `client_id` int(11) NOT NULL,
    `project_id` int(11) NOT NULL,
    `purpose` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    `received_from` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `cheque_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `cheque_to` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `project_id_from` int(11) DEFAULT NULL,
    `cheque_drawer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `recipient_purpose` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `transferrer_purpose` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `client_id_from` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `outgoings_user_id_index` (`user_id`),
    KEY `outgoings_client_id_index` (`client_id`),
    KEY `outgoings_project_id_index` (`project_id`),
    KEY `outgoings_project_id_from_index` (`project_id_from`),
    KEY `outgoings_client_id_from_index` (`client_id_from`)
  ) ENGINE=MyISAM AUTO_INCREMENT=228 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
  </code></pre>
  
  <p>And finally, this table has data inserted and written to it by a PHP application that I wrote, in Laravel. However, the app never runs an update query on this table. All of this used to work fine, until I migrated the app to a new server, and I'm now unable to run my updates.</p>
  
  <p>Oh, any my mysql version is: 5.5.41, running on Ubuntu.</p>
  
  <p>(These questions seem to be asking much the same, however none of the answers there work for me, so I'm asking here with all of my data: <a href="https://stackoverflow.com/questions/11148980/why-would-rows-match-but-not-be-changed-with-a-mysql-update-statement">Why would rows match but not be changed with a mysql update statement?</a> and <a href="https://stackoverflow.com/questions/15309766/update-statement-in-mysql-not-working-while-it-has-to-work">Update statement in mysql not working, while it has to work</a>)</p>