title: Magento - how to load file into database
body: <p>I want to execute following command:</p>
  
  <p><code>INTO TABLE example_table
  FIELDS TERMINATED BY ';'
  LINES TERMINATED BY '\n'
  (field1,field2,field3);</code></p>
  
  <p>I tried to to this this way:</p>
  
  <pre><code>$app = Mage::app();
  
  umask(0);
  
  Mage::setIsDeveloperMode(true);
  
  $write = Mage::getSingleton('core/resource')-&gt;getConnection('core_write');
  $write-&gt;query("INTO TABLE example_table
  FIELDS TERMINATED BY ';'
  LINES TERMINATED BY '\n'
  (field1,field2,field3)");
  </code></pre>
  
  <p>I want also to <code>CREATE OR REPLACE VIEW...</code> and <code>TRUNCATE example_table</code></p>
  
  <p>The error I get is:</p>
  
  <p><code>Error: Warning: PDOStatement::execute(): LOAD DATA LOCAL INFILE forbidden in \lib\Zend\Db\Statement\Pdo.php on line 228</code></p>