Forum Moderators: coopster
I have an existing job site, running on mysql and php. The website was updated and new fields were added, and some of the old ones were taken out.
1. I have the old site but would like to go to the new site.
2. I have data in the old site that needs to go over to new site.
3. But some of the fields from the old were removed in the new.
How do I get all database over to the new site, plus having all the fields and the fields in the new as well. So that they can all work together as one.
So all the fields in new and old with data, should now be in the new. HELP how do I get all this to work.
Example: New DB has...Name, address, phone, email.
Old DB has...Name, address, last, level, phone, email.
Import may give error that culumns and fields are not in order.
Thanks
If all the fields in the new are in the old, you can make a query on the old one to select only the fields needed on the new one, and then export the result.
SELECT name, address, phone, email FROM old_table
I have always scripted data conversions.
Get a script to select a row from the old and insert into the new with added cols and removing the data that is not needed. If the dbs are not on the same serevr then you can use a script to create a dump file that you can upload to the new server.
I always use a file to log all actions in a conversion, as verbose as possible, so that I can verify every step afterwards.
I also do a few test runs before executing it on the real db.
Thanks for replying to my post, but I am very very new at this. I bought the website, and I have to deal with fixing this. I am sorry but I do not understand what I should do with what you both have stated.
Due to the fact I don't understand PHP SQL, only the basics or the basics.
Please try to make things easier for me.
Not sure if I can send you SQL DB and see if you can do this for me.
Regards
Csreso
I am afraid without knowing the basics as you say you don't you are perhaps in over your head.
You really should look into getting a User Guide for the database you have and see what functions they have for porting it over to another box.
[edited by: Demaestro at 3:31 pm (utc) on Nov. 5, 2007]
Old: 1 2 3 4 5
New: 1 2 2a, 2b, 3 4a, 5
So they are saying that I should enter the fields that has a's b's etc. within the OLD DB. When this is done I should import the old DB with the new fields and old fields to retain the exisiting data.
So when imported all old and new fields will start to work with the site.
My quesiton is: Can this work the way they stated?
Will I not get errors that the fields and columns etc. are not in order.
What say the experts out there.
Regards
csreso1
The reference manual is (hopefully, as I havent used mysql for ages, soi this could be something else...) at [dev.mysql.com...]
Once you have an idea about the script then you could always post it here if it doesnt work.