title: How to Run a Custom update query in codeigniter
body: <p>Is it possible to run a custom update query in codeigniter. I need to run following query in codeigniter,</p>
  
  <pre><code>UPDATE `category` SET `online`= IF(online=1,0,1) WHERE id = 10
  </code></pre>
  
  <p>it is checking online value before update. if online = 1 then 0,if online = 0 then 1. I tested and query is working perfect, but how can I run this query in codeigniter.</p>