Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2010
    Posts
    31
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Program to import MySql data for me?

    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!

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,437
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •