title: array to string conversion error in codeigniter 3.0.1
body: <p>I have the following error message while updating my records in database </p>
  
  <blockquote>
    <p>Severity: Notice</p>
    
    <p>Message: Array to string conversion</p>
    
    <p>Filename: database/DB_query_builder.php</p>
    
    <p>Line Number: 662</p>
    
    <p>Backtrace:</p>
    
    <p>File: C:\xampp\htdocs\Site\application\models\class_model.php Line: 48
    Function: where</p>
    
    <p>File: C:\xampp\htdocs\Site\application\controllers\class_con.php Line:
    107 Function: update</p>
    
    <p>File: C:\xampp\htdocs\Site\index.php Line: 292 Function: require_once</p>
  </blockquote>
  
  <p>here my controller</p>
  
  <pre><code>function edit($id)
  {
      $rules = [
          [
              'field' =&gt; 'classname',
              'label' =&gt; 'Class Name',
              'rules' =&gt; 'trim|required'
          ],
          [
              'field' =&gt; 'inchargename',
              'label' =&gt; 'Incharge Name',
              'rules' =&gt; 'trim|required'
          ],
          [
              'field' =&gt; 'classstrength',
              'label' =&gt; 'Class Strength',
              'rules' =&gt; 'trim|required'
          ]
      ];
      $this-&gt;form_validation-&gt;set_rules($rules);
      $class = $this-&gt;class_model-&gt;find($id)-&gt;row();
  
  
      if($this-&gt;form_validation-&gt;run() == FALSE)
      {
          $this-&gt;load-&gt;view('admin/class/classEdit',array('class'=&gt;$class));
      }
      else
      {
  
          $data['classname']      = set_value('classname');
          $data['inchargename']   = set_value('inchargename');
          $data['classstregth']   = set_value('classstregth');
  
          $this-&gt;class_model-&gt;update($id,$data);
          $this-&gt;session-&gt;set_flashdata('message','Class has been Updated Successfully');
          redirect('class_con/index');
  
      }
  }
  </code></pre>
  
  <p>and here's my model </p>
  
  <pre><code>public function find($id) {
  
      $this-&gt;db-&gt;where('id',$id);
      $row = $this-&gt;db-&gt;get('class');
      return $row;
  }
  
  function update($data, $id)
  {
      try{
          $this-&gt;db-&gt;where('id',$id);
          $this-&gt;db-&gt;update('class', $data);
          return true;
      }
      catch(Execption $e){
          echo $e-&gt;getMessage();
      }
  
  }
  </code></pre>
  
  <p>and here is my view</p>
  
  <pre><code>&lt;?php echo form_open_multipart('class_con/edit/'.$class-&gt;id); ?&gt;
                          &lt;div class="form-group" id="register-login-group"&gt;
                              &lt;label for="classname"&gt;Class Name&lt;/label&gt;
                              &lt;div class="input-group"&gt;
                                  &lt;input type="text" class="form-control" id="classname" name="classname" value="&lt;?php echo $class-&gt;classname; ?&gt;" placeholder="Class Name"&gt;
                                  &lt;div class="input-group-addon"&gt;&lt;i class="fa fa-pencil"&gt;&lt;/i&gt;&lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="form-group" id="register-login-group"&gt;
                              &lt;label for="classname"&gt;Incharge Name&lt;/label&gt;
                              &lt;div class="input-group"&gt;
                                  &lt;input type="text" class="form-control" id="inchargename" name="inchargename" value="&lt;?php echo $class-&gt;inchargename; ?&gt;" placeholder="Incharge Name"&gt;
                                  &lt;div class="input-group-addon"&gt;&lt;i class="fa fa-pencil"&gt;&lt;/i&gt;&lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="form-group" id="register-login-group"&gt;
                              &lt;label for="classname"&gt;Class Strength&lt;/label&gt;
                              &lt;div class="input-group"&gt;
                                  &lt;input type="text" class="form-control" id="classstrength" name="classstrength" value="&lt;?php echo $class-&gt;classstrength; ?&gt;" placeholder="Class Stregth"&gt;
                                  &lt;div class="input-group-addon"&gt;&lt;i class="fa fa-pencil"&gt;&lt;/i&gt;&lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                                  &lt;button type="submit" class="btn btn-primary"&gt;Save&lt;/button&gt;
                                  &lt;?=anchor('class_con/index','Cancel',['class'=&gt;'btn btn-warning'])?&gt;
                      &lt;?php echo form_close(); ?&gt;
  </code></pre>