title: load data local infile - select ignoring last column
body: <p>I'm trying to import csv file into mysql database using <strong>load data local infile</strong></p>
  
  <p>My csv file looks like this: </p>
  
  <pre><code>1;Lubos;Chrapna;92;muz;Topolcany
  2;Branislav;Grecni;28;muz;Topolcianky
  3;David;Forgac;57;muz;Hronsky Benadik
  4;Imrich;Doci;58;muz;Kosice
  </code></pre>
  
  <p>table I wanna put this cvs file in looks like this:</p>
  
  <pre><code>   CREATE TABLE IF NOT EXISTS DIM_zakaznik (
     id int(5),
     meno varchar(15),
     priezvisko varchar(15),
     vek int(15),
     pohlavie varchar(15),
     bydlisko varchar(15))
  </code></pre>
  
  <p>and my query looks like this:</p>
  
  <pre><code>    load data local infile 'dim_zakaznik.csv' into table DIM_zakaznik 
      fields terminated by ';'
      enclosed by '\n'
      lines terminated by '\n';
  </code></pre>
  
  <p>it works just fine and when I look at that table in phpMyAdmin everything looks OK but my problem is that when I'm trying to run select it's ignoring last column (called 'bydlisko')</p>
  
  <p>for example I try this:</p>
  
  <pre><code> SELECT * FROM `dim_zakaznik` WHERE `bydlisko`='Topolcany'
  </code></pre>
  
  <p>and all it does it just says: <em>"MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0184 sec)"</em></p>
  
  <p>it shouldn't be empty result right?
  It's not working only with that last column and I have no idea why.
  When I tried it before with those columns plus I added another one column (that column was last in table) it ignored that other column (that was last column in table)</p>
  
  <p>I'd really appreciate some help. Thanks in advance!</p>