upsyndrome Posted December 16, 2008 Share Posted December 16, 2008 MySQL Version: 5.0.51a PHP Version: 5.2.6 MySQLi extension enabled Browser: IE7 Query: UPDATE listitems SET status=" . $itemStatus . " WHERE itemid=14; ($itemStatus resolves to either "complete" or "incomplete") Problem: Using an AJAX call triggered by an onclick event, I am updating a single column of a single row in the listitems table. This works fine at first, but I noticed that if I try to update the same row more than twice without clearing the browser cache between attempts, the third and any successive updates fail silently. When this happens, $mysqli->error returns nothing, and $mysqli-info returns "Rows matched: 1 Changed: 1 Warnings: 0", but the change does is *not* reflected in the database. Is there any known issue where in IE, multiple updates to the same row somehow automatically lock that row or somehow get interrupted by the browser cache? Link to comment https://forums.phpfreaks.com/topic/137242-repeated-mysql-updates-fail-silently-in-ie/ Share on other sites More sharing options...
upsyndrome Posted December 16, 2008 Author Share Posted December 16, 2008 After playing around with it a bit, I tried attaching a randomly generated number as a query string parameter to the AJAX GET call. This prevents IE from caching whatever it was that it was caching, and stops the issue from cropping up. Link to comment https://forums.phpfreaks.com/topic/137242-repeated-mysql-updates-fail-silently-in-ie/#findComment-716953 Share on other sites More sharing options...
revraz Posted December 16, 2008 Share Posted December 16, 2008 I would think you'd need single quotes around your 'complete' or 'incomplete' Link to comment https://forums.phpfreaks.com/topic/137242-repeated-mysql-updates-fail-silently-in-ie/#findComment-716969 Share on other sites More sharing options...
upsyndrome Posted December 16, 2008 Author Share Posted December 16, 2008 Yes, sorry I didn't represent that clearly in my description. Quoting is done properly in the code and not responsible for the caching issue. Link to comment https://forums.phpfreaks.com/topic/137242-repeated-mysql-updates-fail-silently-in-ie/#findComment-716982 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.