IPB
IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Import of CSV files in phpMyAdmin
Ken Roy
post Oct 29 2009, 10:39 AM
Post #1


Advanced Member


Group: Members
Posts: 1,999
Joined: 12-October 05
From: Plano, TX
Member No.: 645



This is off topic for TNG, which is why I am posting it in the Chit Chat subforum.

Do any of you database experts know what I need to change to limit the number of rows imported from a CSV file to only those that contain data?

I am currently building a World War II Veterans database search for the veterans who served from the area of Aroostook County, Maine where I grew up.

I have 1180 rows in the csv file, yet phpMyAdmin appears to have built 65,513 total rows.

I don't recall phpMyAdmin behaving that way on my old desktop. It would import only the number of rows that had data.

What parameter am I overlooking? On import, I am using CSV using LOAD DATA with
[code] Fields terminated by comma
Fields enclosed by quotes
Fields escaped by back-slash
Lines terminate by Auto

BTW, the same behavior appears to occur on my production web site.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ken Roy
post Nov 8 2009, 05:48 AM
Post #2


Advanced Member


Group: Members
Posts: 1,999
Joined: 12-October 05
From: Plano, TX
Member No.: 645



QUOTE(Ken Roy @ Oct 29 2009, 10:39 AM) *

This is off topic for TNG, which is why I am posting it in the Chit Chat subforum.

Do any of you database experts know what I need to change to limit the number of rows imported from a CSV file to only those that contain data?

I am currently building a World War II Veterans database search for the veterans who served from the area of Aroostook County, Maine where I grew up.

I have 1180 rows in the csv file, yet phpMyAdmin appears to have built 65,513 total rows.

I don't recall phpMyAdmin behaving that way on my old desktop. It would import only the number of rows that had data.

What parameter am I overlooking? On import, I am using CSV using LOAD DATA with
[code] Fields terminated by comma
Fields enclosed by quotes
Fields escaped by back-slash
Lines terminate by Auto

BTW, the same behavior appears to occur on my production web site.

The problem appears to have been caused by Excel thinking there was data in the columns and rows beyond what I considered the active range within the spreadsheet.

I resolved the problem by deleting all columns and rows beyond what my active data should have been and now when I create the csv file from the excel spreadsheet it only has 1204 rows.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 8th September 2010 - 06:18 AM