title: echo jquery data table select query in codeigniter
body: <p>I want to echo this select query of jquery data table.<br>
  I the use codeigniter framework.</p>
  
  <p>Below is my code.</p>
  
  <pre><code> $this-&gt;datatables-&gt;select("@a:=@a+1 serial_number, id as staff_id, CONCAT(first_name,' ',last_name)as staff_name, email,phone_number,department", false);
      $this-&gt;datatables-&gt;from("staff_member, (SELECT @a:= 0) AS a");
      $this-&gt;datatables-&gt;where('status', '1');
      ## Email condition
  
      if (isset($_POST['sSearch']) &amp;&amp; $_POST['sSearch'] != '') {
          $this-&gt;datatables-&gt;like('first_name', trim($_POST['sSearch']), 'both');
      }
  
      if (isset($_POST['email']) &amp;&amp; $_POST['email'] != '') {
          $this-&gt;datatables-&gt;like('email', trim($_POST['email']), 'both');
      }
      mprd($this-&gt;datatables-&gt;generate());    
      echo $this-&gt;datatables-&gt;generate();
  </code></pre>