Page 1 of 1

migration

Posted: Fri Sep 01, 2006 5:16 pm
by sergey.khodjamirian
Hi

I am trying to upload a .csv file to the mysql server. so I have accessed phpMyAdmin (version 2.8.2.4). I select my database.

At the bottom of the page there is not "import text file" link.

However there is an import button on the top panel. I click it, browse the file, when it asks me for character set of the file i leave the default utf8. Strangely, at the bottom there is a radio button with only one choice: SQL. When I click Go, it gives me a huge red error message. At the bottom:

Code: Select all

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'id,lang,active,keywords,thema,content,author,email,comment,datum
1,en,yes,revie' at line 1
Okay. So i thought of taking another route. I select faqdata table, the structure appears in the window. THEN i click import and when i browse for my .csv file, the radio buttons at the bottom expand and there is these choices suddenly (the stuff in brackets is what I see):




Format of imported file

CSV (radio button)

CSV using LOAD DATA (radio button)
SQL (radio button)



CSV options

Replace table data with file (tick box, unticked by default)
Ignore duplicate rows (tick box, unticked by default)
Fields terminated by (default ; )
Fields enclosed by (default " )
Fields escaped by ( default \ )
Lines terminated by (default 'auto'
Column names (blank)


Options for CSV import using LOAD DATA

Replace table data with file (tick box, unticked by default)
Ignore duplicate rows (tick box, unticked by default)
Fields terminated by (default ; )
Fields enclosed by (default " )
Fields escaped by ( default \ )
Lines terminated by (default 'auto'
Column names (blank)
Use LOCAL keyword (tick box, unticked by default)


when I press Go I get:;

Error
Invalid field count in CSV input on line 1.


Please help, because this is really tedious if I have to input every record manually.

thanks

Sergey

Posted: Sat Sep 02, 2006 7:50 am
by Thorsten
Hi,

there are two columns missing, the solution_id and the revision_id.

bye
Thorsten

Posted: Sat Sep 02, 2006 2:30 pm
by sergey.khodjamirian
should I leave those blank?

Posted: Sat Sep 02, 2006 2:44 pm
by Thorsten
Hi,

the solution_id is an incremental integer value (1000, 1001, 1002, ...) and the revision_id is always 0 for the first time.

bye
Thorsten