Jump to content

PHP MySQL update works then "disappears"(like a rollback)


philliphanatic

Recommended Posts

What could cause an updated field in a MySQL database to change back to its original value when no additional queries have been run?

 

I have an application where the employees enter all of their tasks which is used in generating invoices.

 

There are 2 tables involved for this function:

TASKS

INVOICES

 

The mgr selects all of the tasks he wants included in a new invoice.

 

The application does an "Insert" in the INVOICES table for the invoice, and performs an "Update" on the TASKS table.  For each task the mgr selected, two fields in the TASKS table are updated ("invoiced" and "invoice_id" both default to 0 when the task is originally inserted).

 

The insert and update work fine, I can look in the tables and see the changes to the TASKS records, and the application reads and displays these changes as well.

 

BUT... after a few hours pass (not sure exactly when it happens), all of the sudden the "invoiced" and "invoice_id" fields in the TASKS table are back to their initial value '0'.  The record that was inserted into the INVOICES table is still there, but the TASK update is gone.

 

I have 33 tables that I perform updates on in this application, and this is the only table in which this happens.

 

 

Anybody have an idea of what might be going on?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.