Jump to content

Repeated MySQL Updates Fail Silently in IE


upsyndrome

Recommended Posts

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?

 

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.