Export thread

Need a bit of (PHP?) advice for working with some .CSV files

#1

Thread Necromancer

Thread Necromancer

At least, I'm thinking it'll be done in php as php is how the data is processed for the web anyhow, but I'm definitely open to alternatives as I just need an easy solution as I'm at a complete loss as to how to fix this problem.
I could be on the complete wrong track and should be looking at SQL or something, but this is why I come to the big brains of our forum.

Here's my problem. I have a number of databases. One main one that comes from a distributor but is sorely lacking in a lot of the information that I need to present. I can get this information from the manufacturers in their own .csv files, but I need to combine the information so I can upload the single .csv as a feed into a website. There are literally THOUSANDS of products, so doing this by hand is entirely out of the question.

My thought processes on this is to write a PHP script that can parse both databases looking at a common string and then basically write the combined information into a single database.
Product numbers from one source to the other are similar, and I can do a bulk replace on either one of them to make them the same, which would give me my common string.

The problem I run into is my unfamiliarity with PHP. This is the first time I've ever had to code anything requiring it. So, PHP/Database experts, is my thought process sound or should I be investigating a different method to accomplish this? If it is a sound idea, where do I begin?

-edit-
BTW, I've already tried the the command prompt method to combine csv files: (ie, having them in the same directory and doing copy *.csv file.csv) but that merely tacks that databases together creating a new database with duplicate entries with some of the info in one and the rest in another.


Top