Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2004
    Posts
    2

    Unanswered: cgi txt db to mysql

    hi there..

    i have a cgi database..
    the cgi reads the datareh.txt file...
    the txt file is fielded with | |
    the database txt file fields is made of city-phone-fax-address-company name-keywords-sector etc..
    like this;

    Istanbul|Sampiyon Sarkuteri|Buyukdere C N70/A Mecidiyekoy|0212 2753164||istanbulgidasanayiureticilerivesaticilari |gidasanayiureticilerivesaticilari dnt|konserveciler yemekler gidacilar gidalar pastaneciler pastaneler kuruyemisciler cikolatalar copsisler donerler izgaralar yagcilar mantarlar dondurmacilar uncular sekerciler pekmezciler baharatcilar tavukcular ureticileri saticilari|canned food tinned nourishment bakery dried fruit chocolate ice cream flour sugar spices|conserve conservele mincari alimente cofetarie fructe uscate alune chocolate doner gratar ciuperci ulei ingetata faina dulciuri dulce dulceata pui gaina mirodenie produse producatori| | |

    when someone search for something the cgi reads the txt file and copy the line to search results...

    ok my question is how to convert this txt file to mysql database...
    this database is terrible bec. when I want to change something or add another company i add or change the datareh.txt file in my local drive and upload it to server everytime..and it is 36 mb..!!!!

    i think i have two possibility..first to change the database to mysql....second find a way to add the 36 mb datareh.txt file online..(it is nearly impossible to add it with online txt editor scripts bec of its size i think)

    i hope you understand my problem...any help will be usefull..thanks for spending time...

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    create the table first in mysql then use the LOAD DATA INFILE to bring your text file into the mysql database table.

    I would do that first because you then have all the data into mysql to work with.

    You then can figure out what tables you need to move your database towards normalization. you can then do a select out of this first table on only the fields you need for each of the other tables.

    (i.e. you might want to create one for contact info of each supplier, you would then only select the fields from the master table that you would need in the contact table. you could assign an autoincrement field or something to identify the suppliers or whatever).

    finally, when you are happy with all your other tables you can delete the initial table from your database.

  3. #3
    Join Date
    Sep 2004
    Posts
    2
    as i said before the file is 36 mb...
    creating tables from that one make sense..

    offf very mixy..i think i need more explanation...

  4. #4
    Join Date
    Sep 2004
    Posts
    2
    as i said before the file is 36 mb...
    creating tables from that one make sense..but uploading 36mb....

    offf very mixy..i think i need more explanation...

Posting Permissions

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