...

View Full Version : Program to import MySql data for me?



treetops
06-08-2011, 09:46 AM
Hello,

I run a fairly large & popular community based website but currently cannot afford to pay someone to update my import scripts (php/mysql), which import data from affiliates to populate a table in our database. Problem is the partners/affiliates are sometimes changing their schema, which they have done recently.

I'm therefore currently inserting the data manually, but its taking a good 5 minutes a row, and there are thousands of rows ahead of me. I'm therefore wondering if there is available software that allows you to import data by simply matching fields in a csv file to the database fields?

Some rows would need to be new, some rows would need just a few fields updating. Is there software that can do this? It would need to fuzzy match a 'Name' field for each row etc.

There are some linked tables but I could bypass those for now.

I realise i could be clutching at straws here but any info would be appreciated. Many thanks!

Fumigator
06-08-2011, 04:17 PM
If you can standardize the import file, it will be a simple matter. In other words, separate the INSERTs from the UPDATEs. Make sure every record in the import file has clean and consistent data.

Old Pedant
06-08-2011, 07:06 PM
The "fuzzy" match on name is the tough part. How fuzzy? What is the tolerance level? If it's so fuzzy that only a human can make the decision, then you are probably hosed. But if you can figure out an algorithm for doing the fuzzy match, then it seems simple enough.

All you would need to do is provide a "mapping" of the columns in the external data to the columns in your db table. And then you could write a simple PHP program to read from the external data, test for the fuzzy match, and then insert or update the db data as appropriate.

But it really all depends on that fuzzy matching.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum