Thanks for the tips.
Are you sure that the file is uploaded completely?
Yes, in all cases, it's all there
Are you checking for database errors?
I'm using { RaiseError => 1} and $dbh->trace(2) and no errors.
Have you read Before asking a database related question ...?
I have, but just re-read it.
Did you try that SQL statement outside your script? I mean, manually,
+from the mysql monitor?
Did not. Working on a remote shared web server.
Does the table structure correspond to the CVS structure?
Dead on!
Again, some of the file is importing. It seems like there is some hidden character in the CSV. Per your suggestion, I will ask in a more 'targeted' forum. Thanks!
—Brad "Don't ever take a fence down until you know the reason it was put up." G. K. Chesterton
| [reply] [Watch: Dir/Any] [d/l] [select] |
$buffer =~ s/[\r\n]+/\n/g;
to standardise all your line endings. You could use \r if you want but \n is the default, the standard .... and it's less typing in your LOAD DATA.
If that does not work then I suggest you use perl to read and validate the uploaded file before you pass it to mysql. I too suggest trying to load the file manually. You could download the file and try loading it into a local MySQL DB if you don't have access to the remote one.
| [reply] [Watch: Dir/Any] [d/l] |
,AL,2
,AK,4
in ascii
A--65
L--76
,--44
2--50
--13
,--44
A--65
K--75
,--44
4--52
--13
What is the blank spot? Even if it's a new line, shouldn't it have a value? Just curious.
—Brad "Don't ever take a fence down until you know the reason it was put up." G. K. Chesterton
| [reply] [Watch: Dir/Any] [d/l] [select] |
Did not. Working on a remote shared web server.
Don't you think that this very step could tell you in which direction to look?
I would try to do the testing in a local machine. Installing MySQL is not rocket science and your table does not seem to have a million records.
So, instead of guessing, why don't you test it?
| [reply] [Watch: Dir/Any] |