title: Multiple INSERT queries using PDO & SQLite
body: <p>I have this sqlite3 db:</p>
  
  <pre><code>CREATE TABLE links (
   id INTEGER PRIMARY KEY AUTOINCREMENT,
   name TEXT UNIQUE,
   link1 TEXT,
   link2 TEXT,
   link3 TEXT
  );
  </code></pre>
  
  <p>And I am trying to insert multiple entries in the same query, this is my code:</p>
  
  <pre><code>$db = new PDO('sqlite:db.sqlite');
  
  $sql = "INSERT INTO links VALUES";
  
  $filelines = file('filename');
  
  foreach($filelines as $key =&gt; $line)
  {
   if(count($filelines)-1==$key)
    $sql .= "(NULL, '".trim($line)."', '', '', '');";
   else
    $sql .= "(NULL, '".trim($line)."', '', '', ''),";
  }
  
  $insert = $db-&gt;prepare($sql);
  
  $insert-&gt;execute();
  </code></pre>
  
  <p>Single inserts works fine but with this code I get the php error:</p>
  
  <p><strong>Call to a member function execute() on a non-object</strong></p>
  
  <p>I've also tried creating the sql query like 'VALUES(...,...), VALUES(...,...),... but get the same error:</p>
  
  <p>What am I doing wrong?</p>