jeffers Posted September 29, 2013 Share Posted September 29, 2013 Hi CC5 I have about 1600 products on the website and I would like to update about 500 of them. They are at present sitting in an access database with the prices updated and I can generate a CSV from the access database. I have tried it with a just a few thinking it would overwrite the existing entries but it merely duplicates them. Can anyone help? Best Regards Jeffres Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted September 29, 2013 Share Posted September 29, 2013 Hi The simplest way is to use the csv to generate a set of mysql commands to update the prices and then execute them through phpmyadmin Ian Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 29, 2013 Share Posted September 29, 2013 CubeCart is not programmed to replace existing records with imported records (when the product_id values match). In phpMyAdmin, you can import a CSV file (assuming you know what you are doing) and in the Import dialog box, check the box for "Replace table data with file." (This comes from a book, Mastering phpMyAdmin 3.4.) Quote Link to comment Share on other sites More sharing options...
jeffers Posted September 30, 2013 Author Share Posted September 30, 2013 Thanks bsmither I will get that book and Master the topic. Many Thanks Jeff Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted September 30, 2013 Share Posted September 30, 2013 If you are only updating one or a few columns for each of the 500 records, then you would be much better off creating a .sql file from the csv file which specifically does the updates and then executing those UPDATE statements through phpMyAdmin The general form of the command you need to use to update a single row's column: UPDATE my_table SET my_column='new value' WHERE something='some value'; Thanks Ian 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.