mysql: "terminated by AUTO" -- myAdmin v commandline

From: Ken Irwin <kirwin_at_nyob>
Date: Mon, 14 Nov 2011 11:19:58 -0500
To: CODE4LIB_at_LISTSERV.ND.EDU
Hi folks,

Using the ever-handy phpMyAdmin tool for MySQL db management, there's a CSV import option to parse lines like this (all GUI-like):

LOAD DATA INFILE 'file.csv'
INTO TABLE tbl_name
FIELDS TERMINATED BY ','
FIELDS ENCLOSED BY '\"',
FIELDS ESCAPED BY '\"'
LINES TERMINATED BY 'auto'

However, when I try that same sort of thing on the command-line, I can't get "terminated by auto" to work, with or without quotes. Looking at the MySQL documentation, this doesn't actually seem to be a legitimate instruction - maybe it's something slick that phpMyAdmin is doing in the background?

I want to be that slick too - does anyone know of a way to introduce that kind of flexibility at the code level? Have you already written a script that handles these variations? Any ideas?

Thanks
ken
Received on Mon Nov 14 2011 - 11:22:19 EST