Jump to content

Complex SQL / php Statement ?


andrew_ww

Recommended Posts

Hello,

I'm trying to design quite a complex SQL statement - here what I need to accomplish:

I have built a form that is populated with records from mySQL db (table1).  This table has the following values:

ID
value1
value2
value3
value4

The first thing I need to do is to update whatever values the user puts into these new text boxes (over writing the existing records in the database, this I believe is quite simply using the UPDATE statement.  What I also need to do is to send the original value of ID and value 2 into table2, and equally the original value of ID, value3 and value4 in to the table3 along with the current date.

I need to do this because these values relate to a state, the history of which over time much be kept (for example on Monday it could status1, then on Wednesday it would change to status3)

Any ideas how I can accomplish this ?

Thanks.
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.