Re: Importing CSV files to MySql Db issue.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Carter wrote:
Is there something that has changed in the new MySql DB ?

What new mysql? Has your host upgraded your database version or something?

Mysql won't change the interface between versions except to improve it.

I am trying to upload a data like this from my CSV file to a table through
CSV upload and not CSV Load Data:

Eh? You're using the csv table type or how are you importing the data?

field1,field2,field3,field4,field5,field,6,field7,field8
field1,field2,field3,field4,field5,field,6,field7,field8

Parameters I am using are:

Fields Terminated By: ,
Fields Enclosed By: _ (space character)
Fields Escaped By: _ (space character)

Every time I am getting this error: Invalid field count in line 1

If you're using spaces for enclosing then I'm sure you're not handling something properly.

Chris,Carter,email@xxxxxxxxxxx <-- 3 records
Chris Carter,email@xxxxxxxxxxx <-- 2 records

The second one is probably going to break because of the space in the middle of the name.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux