title: PHP to import a csv file to an existing mysql table
body: <p>I have a file called <code>aaa.csv</code> that is already located in the server. I am trying to load it into an existing, but empty <code>MySQL</code> Table. The number of columns of the existing table is the same as in the <code>csv</code> file. The structure of the <code>csv</code> file is like this:</p>
  
  <pre>
  Name/Note/Average
  "PEREZ, JUAN"/7/7.4
  "BENITO, ALVARO"/8.3/5
  </pre>
  
  <p>So, the <code>php</code> code I am using is as follows:</p>
  
  <pre><code>MYSQL_CONNECT('db56569XXXXX.db.1and1.com','dbo56569xxxx','mypassword') 
      or die("Servidor sin conexión");
  
  MYSQL_SELECT_DB('db565699064') or die('La base de datos no existe');
  
  $sql="LOAD DATA INFILE 'aaa.csv' INTO TABLE TABLE11 "
      . "FIELDS TERMINATED BY '/' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\r' IGNORE 1 LINES";
  
  $res=mysql_query($sql);
  </code></pre>
  
  <p>Is there anything I am doing wrong? I don't get any error message, but <code>TABLE11</code> is still empty.</p>