Jump to content

Updating One Table Record From Another Table?


sintax63

Recommended Posts

I have one table which contains user submitted entries. On the web page which is displaying the entries, I would like to have an "Update This Information" link which users could use to correct any invalid information which was previously submitted.

 

I thought the best way to do this would be to capture the unique ID for that entry, and create an entry in a new table (called "updates") with the updated information. From that table I could approve the updated record and then replace the information in the main table.

 

The problem is, I'm not really sure how to merge, or overwrite the record in the main table with that from the updates table. I will need to keep the same unique ID.

 

Anyone care to shed some light on this subject?

 

Thanks in advance!

Link to comment
Share on other sites

How I have it set up now is that on my "approval page", I pull the record from my 'updates' table and upon approval I use the UPDATE function on the 'main' table... since both are using the same unique ID.

 

It works well, but I didn't know if this was sloppy and there was a better way to do it.

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.