I have a table which is a huge list of all the information that was filled into a form. Each form entry put all the information into the same column, with another column for field_id (and this lets me know exactly where the information was entered). So if the form had 8 entry fields, all the info that was entered would be in one column, and the field_id corresponding to the field it was entered into is in another field.
I am now rebuilding the db to make this mess of a system more useful, but I need to keep all the previously entered data. How can I combine the information from the 8 rows where information was entered into a single row in the new table, based on the field_id column?
So if name/address/phone/email/fax/mother/father/pet were the columns of the new table, but the info for each of these was stored in a single column in the original table with field_ids 1 to 8 in another column, how could I go about doing this?
EDIT: Clearer
Table1 structure: id/meta_value/field_id/entry_id/created_date
Table2 structure: id/name/address/phone/email/fax/mother/father/pet