title: database error 1054 in codeigniter
body: <p>I am trying to do an OTH application and i am getting this error</p>
  
  <blockquote>
    <p>A Database Error Occurred</p>
    
    <p>Error Number: 1054</p>
    
    <p>Unknown column 'data' in 'field list'</p>
    
    <p>SELECT <code>data</code> FROM <code>ci_sessions</code> WHERE <code>id</code> =
    'dd8fddaabb45c365fbf27a6fdc5ea60d59f569e4' AND <code>ip_address</code> = '::1'</p>
    
    <p>Filename: libraries/Session/drivers/Session_database_driver.php</p>
    
    <p>Line Number: 160</p>
  </blockquote>
  
  <p>This is Session_database_driver.php</p>
  
  <pre><code>public function read($session_id) {
          if ($this-&gt;_get_lock($session_id) !== FALSE)
          {
              // Needed by write() to detect session_regenerate_id() calls
              $this-&gt;_session_id = $session_id;
  
              $this-&gt;_db
                  -&gt;select('data')
                  -&gt;from($this-&gt;_config['save_path'])
                  -&gt;where('id', $session_id);
  
              if ($this-&gt;_config['match_ip'])
              {
                  $this-&gt;_db-&gt;where('ip_address', $_SERVER['REMOTE_ADDR']);
              }
  
              if (($result = $this-&gt;_db-&gt;get()-&gt;row()) === NULL)
              {
                  $this-&gt;_fingerprint = md5('');
                  return '';
              }
  
              // PostgreSQL's variant of a BLOB datatype is Bytea, which is a
              // PITA to work with, so we use base64-encoded data in a TEXT
              // field instead.
              $result = ($this-&gt;_platform === 'postgre')
                  ? base64_decode(rtrim($result-&gt;data))
                  : $result-&gt;data;
  
              $this-&gt;_fingerprint = md5($result);
              $this-&gt;_row_exists = TRUE;
              return $result;
          }
  
          $this-&gt;_fingerprint = md5('');
          return '';
  }
  </code></pre>