title: String datetime insert into mysql database with codeigniter
body: <p>I am having following MySQL table</p>
  
  <pre><code>EventId     ObjectKey   Title           Description     When        Duration        Where           Status
  INT         CHAR(36)    VARCHAR(500)    VARCHAR(8000)   DATETIME    VARCHAR(500)    VARCHAR(500)    TINYINT
  </code></pre>
  
  <p>and my PHP array is</p>
  
  <pre><code>$data = array(
      'Title' =&gt; $title,
      'Description' =&gt; $description,
      'When' =&gt; $when,
      'Duration' =&gt; $duration,
      'Where' =&gt; $where
  );
  </code></pre>
  
  <p>The variable <code>$when</code> contains <code>02/21/2013</code>. When I try to insert to the table with CodeIgniter</p>
  
  <pre><code>public function insert_event($guid, $data)
  {
      $CI = &amp; get_instance();
      $CI-&gt;load-&gt;database('default');
      $CI-&gt;db-&gt;set($data);
      $CI-&gt;db-&gt;set('ObjectKey', $guid);
      $CI-&gt;db-&gt;set('Status', 1);
      $vari = $CI-&gt;db-&gt;insert('Events');
      return $vari;
  }
  </code></pre>
  
  <p>Everything inserted correctly except <code>date</code>. Can you help me on this?</p>