Immediately after the UPDATE statement follows the SELECT statement, which is supposed to select a new value of the updated cell. However, the old value is returned. How to solve this with MySQL.
if($q = mysql_query("UPDATE `table-1` SET `cell-1` = '1', `last_load` = IF(`last_load` = '0000-00-00 00:00:00', DATE_ADD(NOW(), INTERVAL 10 DAY), IF(`last_load` < CURDATE(), DATE_ADD(NOW(), INTERVAL 10 DAY), DATE_ADD(`last_load`, INTERVAL 10 DAY) ) ) WHERE `column_id` = '$column_id'")) { $q = mysql_query("SELECT `last_load` FROM `table-1` WHERE `column_id` = '$column_id'"); send(true,mysql_fetch_assoc($q)['last_load']); }