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 2 of 2
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts

    load multiple tables from file

    Have a pool system consisting from 3 tables.

    How would I load data for new pool from simple file , like via LOAD DATA INFILE, having in midd that first table is master, having autoinc, and that autoinc should get into another 2 tables allso ?

    file would look like:

    Code:
    "super_master","some data on that, like which answer is correct ..."
    "master,""what time is it","en"
    "master,""koliko je ura","sl"
    "detail,""pet","sl"
    "detail,""five","en"
    "detail,""šest","sl"
    "detail,""six","en"
    ....

    Al I can think is manualy editing tables, manualy adding data,writig terible complicated parsing program....Looking for advice for simple sollution.Even having file in shape of XML means a bunch of dumb manual editing, mistyping, of that file, or m'I wrong and there is some super smart xml editor tah would ultimately show me user friendly (3) table like interface ?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,965
    Thanks
    79
    Thanked 4,429 Times in 4,394 Posts
    Doesn't look that complicated to me.

    Could write that in ASP or JSP in a handful of lines of code. Surely same in PHP, though I don't have experience with PHP.

    Would be especially easy with ASP, I think. I could just open the CSV file as if it is a DB and then handle the fields easily from there.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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