lupradoa Posted October 6, 2015 Share Posted October 6, 2015 Hi, I've building a cd/lp/dvd shop and I added the field "author" (autor) to the table 'prstshp_product' following the tutorials found on the internet. Now, I want to populate the database with items from a csv file but this field does not appear on the drop-down menu to select the destination. This field doesn't appear on the product list, but I can see it on "Add new product" page. Could you give me some hint to solve it? Thanks in advance Link to comment Share on other sites More sharing options...
NemoPS Posted October 7, 2015 Share Posted October 7, 2015 It's sadly more complicated than it seems. If you are okay in uploading the csv 2 times, you can create a small separate script to handle it. The way I'd do it is by using fgetcsv, after uploading the file normally, using a foreach to go through all the lines and creating a sql statement for each. if you disable autocommit, and send over the commit command after like 500 products, you avoid querying the database for each single product Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now