title: CodeIgniter UPDATE query not working
body: <p>I have a problem with a CodeIgniter <code>UPDATE</code> query.</p>
  
  <p>My model:</p>
  
  <pre><code>function update_order($id,$old_order){
  
      //Update The order
      $query = $this-&gt;db-&gt;query("SELECT * FROM cat WHERE `cat_order`='$old_order' ");
      $row =  $query-&gt;row();
  
      $this-&gt;db-&gt;query("UPDATE cat SET cat_order='".$row-&gt;cat_order."' WHERE id='".$id."' ");
      $this-&gt;db-&gt;query("UPDATE cat SET cat_order='$old_order' WHERE id ='".$row-&gt;id."' ");
  
  }  
  </code></pre>
  
  <p>The <code>SELECT</code> query is working 100% but the two <code>UPDATE</code> queries are not. </p>