keat Posted February 26, 2016 Share Posted February 26, 2016 Weeks ago when I embarked on a V6 upgrade, I found that the addressbook table had no entries for company_name. I assumed, this was because the same field in my V3 cart was called 'company' Today, I did a dummy run of upgrading the live site, just for timings etc. However, before I did, i renamed this field 'company_name', hoping that after the upgrade to V6, this field in 'addressbook' would be populated. However, it's still empty. Am i correct in assuming that it should be populated, it is so in the 'customer' table, but not in the 'addressbook' Alternatively could anyone suggest an SQL script which goes along the lines, copy company_name from customer_table to addressbook_table where customer_id = customer_id Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 26, 2016 Share Posted February 26, 2016 In looking at the install script for CC3.021, I do not find a database column called 'company' in the CubeCart_customer table or anywhere else. Perhaps your 'company' is a mod? UPDATE `CubeCart_addressbook` AS A INNER JOIN `CubeCart_customer` AS C ON A.`customer_id` = C.`customer_id` SET A.`company_name` = C.`company_name` WHERE C.`company_name` != ''; Be sure to use the appropriate column name C.`company_name` in line 4. By JOINing the tables, there should be a resultant (temporary) record for each case where a customer could have one or more entries in the addressbook. Quote Link to comment Share on other sites More sharing options...
keat Posted February 26, 2016 Author Share Posted February 26, 2016 company was indeed a mod. However, I picked up on this a few weeks ago, so when i did my dummy run today, I renamed the field company_name, prior to running the upgrade script. The sql script appears to have worked, I guess I ought to compare the data. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.