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!

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.

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.