Re: Re-Importing .CSV file into Database

From: Date: Wed, 13 Feb 2002 08:04:09 +0000
Subject: Re: Re-Importing .CSV file into Database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84545@lists.php.net to get a copy of this message
> > The error message might be useful, but in any case I think > > you need to enclose the source filename in quotes; also (you > > better check the docs here) if I remember correctly you need > > to give the full path to the source file unless it is in the > > mysql data directory. > > That's right, it needs to be quoted AND have the full path > (and be readable to the MySQL server daemon process thingy) Further to David's comment - the "mysql data directory" (without pathname) is the database's own directory (cf the directory of databases - if that makes any sense) - and any relative pathnames (obviously) lead on from there, so full pathnames are not necessarily necessary. Also, when I did an import last night: 1 it was not necessary to escape the double quote field delimiters (it is within single quotes) 2 because of the vagaries of Windows boxes, it was necessary to ensure the record terminators were treated consistently - either build the export file with only LF or instruct MySQL to use CRLF (as Jason put it to "be readable to the MySQL server daemon process thingy") Regards, =dn

« previous php.general (#84545) next »