title: Codeigniter insert_batch error
body: <p>I use Codeigniter v2.1.4 to insert some values in a sqlite3 database.</p>
  
  <p>The problem is that when I try to insert a batch it gives me an error:</p>
  
  <pre><code>&gt;[17-Jan-2014 22:44:17 UTC] PHP Fatal error:  Call to a member function execute() on a &gt;non-object in E:\Repository\cashy-support-app2\system\database\drivers\pdo\pdo_driver.php &gt;on line 193
  &gt;[17-Jan-2014 22:44:17 UTC] PHP Stack trace:
  &gt;[17-Jan-2014 22:44:17 UTC] PHP   1. {main}() E:\Repository\cashy-support-app2\index.php:0
  &gt;[17-Jan-2014 22:44:17 UTC] PHP   2. require_once() E:\Repository\cashy-support-app2\index.php:202
  &gt;[17-Jan-2014 22:44:17 UTC] PHP   3. call_user_func_array() E:\Repository\cashy-support-app2\system\core\CodeIgniter.php:359
  &gt;[17-Jan-2014 22:44:17 UTC] PHP   4. Main_controller-&gt;index() E:\Repository\cashy-support-app2\system\core\CodeIgniter.php:359
  &gt;[17-Jan-2014 22:44:17 UTC] PHP   5. Favorites_Model-&gt;addToTemp() E:\Repository\cashy-support-app2\application\controllers\main_controller.php:7
  &gt;[17-Jan-2014 22:44:17 UTC] PHP   6. CI_DB_driver-&gt;query() E:\Repository\cashy-support-app2\application\models\favorites_model.php:106
  &gt;[17-Jan-2014 22:44:17 UTC] PHP   7. CI_DB_driver-&gt;simple_query() E:\Repository\cashy-support-app2\system\database\DB_driver.php:299
  &gt;[17-Jan-2014 22:44:17 UTC] PHP   8. CI_DB_pdo_driver-&gt;_execute() E:\Repository\cashy-support-app2\system\database\DB_driver.php:453
  </code></pre>
  
  <p>If I insert only one row it works ok.</p>
  
  <p>This is the problematic query:
  </p>
  
  <pre><code>INSERT INTO temp (Date, Name)
     Values("test","test2"),("test","test2"),("test","test2");
  </code></pre>
  
  <p>If I use this:
  </p>
  
  <pre><code>INSERT INTO temp (Date, Name) Values("test","test2");
  </code></pre>
  
  <p>it works ok.</p>
  
  <p>Also if I use <code>db-&gt;insert(tablename, values)</code> it works ok, but if I use <code>db-&gt;insert_batch(tablename, array)</code>, I get the same error mentioned above.</p>
  
  <p>In a separate sqlite browser i can execute the above querys on the same database without any problem.</p>
  
  <p>Here is my database config in Codeigniter:</p>
  
  <pre><code>$active_group = "default";
  $active_record = TRUE;
  
  $db['default']['hostname'] = 'sqlite:'.APPPATH.'db/Support_Mails.db';
  $db['default']['username'] = '';
  $db['default']['password'] = '';
  $db['default']['database'] = '';//APPPATH.'db/Support_Mails.db';
  $db['default']['dbdriver'] = 'pdo';
  $db['default']['dbprefix'] = '';
  $db['default']['pconnect'] = TRUE;
  $db['default']['db_debug'] = TRUE;
  $db['default']['cache_on'] = FALSE;
  $db['default']['cachedir'] = APPPATH.'cache';
  $db['default']['char_set'] = 'utf8';
  $db['default']['dbcollat'] = 'utf8_general_ci';
  $db['default']['swap_pre'] = '';
  $db['default']['autoinit'] = TRUE;
  $db['default']['stricton'] = FALSE;
  </code></pre>
  
  <p>This is the database:
  </p>
  
  <pre><code>CREATE TABLE [temp] (
      [Date] [TEXT(255)], 
      [Name] [TEXT(255)], 
      [Mail] [TEXT(255)], 
      [Subject] [TEXT(255)], 
      [Conversation] [TEXT(255)], 
      [Language] [TEXT(255)], 
      [Body] [TEXT(30000)], 
      [ROWID] [TEXT(255)], 
      [TableName] [TEXT(255)], 
      [userid] [TEXT(255)]);
  </code></pre>
  
  <p>the array after using print_r(array) looks like this:</p>
  
  <pre><code>[18-Jan-2014 10:20:04 UTC] Array
  (
      [0] =&gt; Array
          (
              [Date] =&gt; test
              [Name] =&gt; test
          )
  
      [1] =&gt; Array
          (
              [Date] =&gt; test
              [Name] =&gt; test
          )
  )
  </code></pre>
  
  <p>Any idea why it does that?
  (Somehow i think that there is a problem in the Codeigniter setup, not in the query itself because i used the same query on the same database with an sqlite browser and it works ok)</p>