views:

20

answers:

1

So I'm impoting a 80000+ lines .cvs files to a MySQL database, using Import CVS via LOAD DATA in phpMyAdmin, and it seems to work fine, there are no error messages.

Problem is, ater the import, all lines in the table, starting with line 24002 have the same number in one of my database fields, and this number doesn't even exist in the .cvs file I import.

Take this as an example:

+-----------+-----------+-----------+
|id         |num 1      |num 2      |
+-----------+-----------+-----------+
|1          |03040304   |22222      |
|2          |03040305   |22223      |
|3          |03040306   |22224      |
|...        |...        |...        |
|24001      |03064304   |46222      |
|24002      |21777777   |46223      | <- 21777777 doesn't exist in my .cvs file
|24003      |21777777   |46224      |
|...        |...        |...        |
+-----------+-----------+-----------+

I tried different things, but nothing helped:

  • starting the import at line 24003
  • removing the lines 24001, 24002 from the .cvs file
  • removing the 24002 first lines from the .cvs file
  • importing the .cvs file without LOAD DATA

This is an example line from the .cvs file:

"SOME NAME";"18/10/2004";"8250";"2157002001";"239423";"Done";"Name SURNAME"

There are no special characters involved, only a-z, A-Z and 0-9.

I have absolutely no clue where this error could come from, any ideas?

Thanks in advance

A: 

What is the definition for the "num 1" field in the database? Is it an int because the max value of an int is 2,147,483,647 which is less than 2,157,002,001.

Jaydee
Oh, yes that's it! "num 1" was set to integer, didn't know there was such a limit. And yes, the "problem number" is 2147483647. Should have said it in the question... Thanks!
Alex