
Exporting, editing the mysql table and importing it back to database - With Excel |
|
| CMS - Content Management Systems |
| Monday, 31 October 2011 02:50 |
|
First go to mysql and select your table for example I am using uc_products table. that is used in Drupal Ubercart site. You just click on export and select
Then you open the file in excel, and edit the data, remember, don't change how the rows are sorted, if you do that, put everything back like it was. I usually do that to change some prices, or mass change weight, dimensions for my products. ok so that is done. Now you export it as CVS comma delimited from Excel. my Excel is kind of weird. Exported file does not use ; to separate cells. It uses , for god sake. So first you need to do is to open your excel CVS file in notepad, and see how the file is structured My first row looks like this vid,nid,model,list_price,cost,sell_price,weight,weight_units,length,width,height, As you can see there are no " " and no semicolons. The cells are separated by commas. Then you open the table in your mysql, empty the table and click on import. Select import from CSV using LOAD DATA and for me, this works As you can see I only filled the Fields terminated by with , That is it, this is the trick |
Great job here. I really enjoyed what...
nice and the very amazing that you ha...
What a Piece of SH!T. Inherited a si...
Check out http://csrhumanresources.co...
yes sure they can, CL has a team of f...
Can a reader flag my ad in Personals?...
Dragon Naturally Speaking I complete...
Newly Updated Bookmarking Sites 2012 ...
Great thanks, looks like i have alot ...
I totally agree that the taxonomy suc...
Hey There. DId you resolve your p...
yes you are right, this company is ho...
For years and years now I have been r...
Thanks for posting this great article...
I just bought this dvd 1 week ago and...