title: Query where mySQL table with JSON column in ci's
body: <p>I'm using codeigniter, and I have a list of numbers (e.g. <code>['1', '2', '12', '42']</code>) on a column (<code>tags_json</code>) of a table names <code>submit</code>, and I want to check if the number (e.g. '2') is in <code>tags_json</code>, in order to show the data the row's content.</p>
  
  <p>The code I've tried is:</p>
  
  <pre><code>$this-&gt;db-&gt;select('*', FALSE);
  $this-&gt;db-&gt;where("JSON_CONTAINS(tags_json,'[2]'");
  $Query = $this-&gt;db-&gt;get('submit');
  echo $Query-&gt;num_rows();
  </code></pre>
  
  <p>Result is:</p>
  
  <blockquote>
    <p>Error Number: 1064
        You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 3</p>
    
    <p>SELECT * FROM <code>submit</code> WHERE JSON_CONTAINS(tags_json,'[2]' IS NULL
        Filename: controllers/Home.php
        Line Number: 281</p>
  </blockquote>
  
  <p>How is it in CI's?</p>