MySQL: Load Data Infile

From: Date: Tue, 16 May 2006 15:40:10 +0000
Subject: MySQL: Load Data Infile
Groups: php.db 
Request: Send a blank email to php-db+get-41910@lists.php.net to get a copy of this message
Greets, I'm trying to use the load data infile syntax within a php script. The data is in csv format. I was under the impression that I could reorder the fields during the insert, such as: "load data infile 'currentData.txt' into table(fieldName2, fieldName1) fields terminated by ','"; The stuff in the parentheses causes an error but without the parens, it's inserts OK. I'm sure I've done this in the past, but is was long ago. Anybody have an insight into this? David (yes, it's more MySQL than PHP related, but I'm not currently subscribed to that list...)

« previous php.db (#41910) next »