title: Update query increment field plus 1 codeigniter
body: <p>I got a problem when trying to increment by 1 on given field in my db. I tried with and without active records.</p>
  
  <p>My functions look like this (in my model)</p>
  
  <pre><code>function _set_reads($id){
  $this-&gt;db-&gt;set('reads', 'reads+1', FALSE)
  $this-&gt;db-&gt;where('id', $id);
  $this-&gt;db-&gt;update('article');
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>function _set_reads($id){
  $sql = 'update article set reads=reads+1 where id=?';
  $this-&gt;db-&gt;query($sql, array($id));
  }
  </code></pre>
  
  <p>I get the same error in both cases and it's the following error message:</p>
  
  <pre><code>Error Number: 1064
  
  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'reads+1 WHERE `id` = '15'' at line 1
  
  UPDATE `article` SET `reads` = reads+1 WHERE `id` = '15'
  </code></pre>
  
  <p>I am using the latest version of MAMP </p>