title: passing multiple arguments to sql query in code igniter without using active records
body: <p>I have already researched on this but didnt come to get the correct answer, I am trying to pass multiple arguments to an sql query in code igniter without using active records and its not working  for me, see what I have done  below</p>
  
  <p>in my model I have:</p>
  
  <pre><code>function get_values($id, $age)
  {
  $sql='SELECT * FROM tblRegister where id=? AND unit=?';
  $query=$this-&gt;db-&gt;query($sql, array('$id','$age'));
  return $query-&gt;result_array();
  
  }
  </code></pre>
  
  <p>in the controller I have:</p>
  
  <pre><code>function get_values()
  {
  $result=$this-&gt;register_model-&gt;get_values(32, 23);
  
  }
  </code></pre>
  
  <p>this doesnt work for me, i think its an error with passing the arguments to the query, how to I format the syntax so that it works just fine? Regards </p>