Thursday 15 April 2010

php - Restructured database, using SQL in phpmyadmin to move data around -


I have recently been working to normalize and restructure my database to make it more effective I am Currently I have around 500 records, and obviously I do not want to lose user data.

Is the easiest way for phpmyadmin to do this through SPL?

In my old table I will do something like this

  records // This table has diverse fields, but these are still unimportant id. Unit 1 | G.   

With my new one, I have divided it into 3 separate tables

  Record ID1 Unit ID | Unit 1 Live record_inet id Record_id | Unit_id1 1 | 1   

Just to be clear, I'm not adding anything to the unit table. The table is for reference, for which the ID stores the records_notes in the table

As you can see it is very simple What went on in the second table is that I have to keep one of my units I started using the index table, because they will be repeated repeatedly. I am then recording id with the unit id and recording id, so I will later send the fields I get Una.

I do not have incredible experience with SQL, although I can say that I know the average I know that this operation will be very easy with my keyboard setup because all my associations are already set Up, but I can not do that

If I understand correctly, then copy the tables related to your old table to the new table. In this situation, you can use something like this

  UPDATE units U INNER U.ID = RID SET U.UIT = RNIT   

Join the archives starting at, copy the unit type from your old table to the new ID, copy the matched id Oga. Table and then you can do something similar on your third table

No comments:

Post a Comment