Emailid
Password
         
  
    Forgot password

New user Sign Up
 

 

How load a tab delimited file into my MySQL database via PHPMyAdmin?                            

Author Name Status Posted Time
Larry Coons 10/29/2008 3:57:17 AM
Author is Offline

Hey,

I want to load a tab delimited file into my MySQL database via PHPMyAdmin. I'm trying to use the "Insert data from a textfile into table"
function but it won't work. It stops after one row which goes completely wrong.

Sample from my .txt file (hope it parses alright h
ere):


Code:
0S 0s 1 0
100000S 100000s 1 100000
1000S 1000s 1 1000
100S 100s 1 100
10S 10s 1 10
11S 11s 1 11Location of the textfile = obvious
Replace table data with file = obvious
Fields terminated by = 'nothing'
I guess
Fields enclosed by = 'nothing'
I guess
Fields escaped by = not applicaple
Lines terminated by = \r\n I guess
Column names = n/a leaving it blank
LOAD method = DATA LOCAL

With the options I've tried it either loads each line into one field terminating after 4 fields which is one row. Or it puts the entire line into the first field and terminates after one row.

I don't know what to put in Field Terminated By since it's a tab and I don't know how to specify that.

Any Help?

Larry<
/p> 


Subject Author Status Date

Re: How load a tab delimited file into my MySQL da
tabase via PHPMyAdmin?

Indira Sivan 10/30/2008 4:13:54 AM

Re: I'm nearly there now

Larry Coons 10/30/2008 4:15:56 AM

Re: How load a tab delimited file into my MySQL da
tabase via PHPMyAdmin?

August Buell 10/30/2008 4:15:07 AM

Re: I found a nice script

Larry Coons 10/30/2008 4:17:36 AM

Re: Good job, glad to hear it.

August Buell 10/30/2008 4:18:54 AM
Related Forums
Optimizing Images
Get a Website Template for Free!!!
Get a Website Template for Free!!!
Do You Sell Your Templates on Ebay?
Template Tutorials





Home | About Us | Site Map | Privacy Policy