php/mysql

DCT Jared Smith jared at dctkc.com
Thu Apr 11 14:08:43 CDT 2002


Your example has only two commas. Therefore only three
fields. You need another comma between [fakelogin] and
(from nas somerouter/S-452984822).

> I want to run LOAD DATE INFILE in order to load data
> into a mysql database. Problem I am having is that for
> some reason when I run it as 
>      LOAD DATA INFILE 'myfile.txt' INTO TABLE mytable 
>      FIELD TERMINATED BY ','
>      LINE TERMINATED BY 'n'
> 
> Problem is that it is not dropping the information
> into the fields the way I want to .
> the following is a example of a line from myfile.txt:
> 
> Fri Mar 15 12,  Login OK,  [fakelogin] (from nas
> somerouter/S-452984822)
> 
> Now what I need to do is drop this into 4 fields.
> date status user router
> 
> Any idea's????




More information about the Kclug mailing list