title: Codeigniter - query does not execute from a specific controller
body: <p>I face this problem: </p>
  
  <p>I have a function in a Model which runs a select query: I call it from the controller A (not real name). When I call the same method, but from the controller B, the PHP script stops when the query executes.</p>
  
  <p>This function receives a number or an array as parameter. I've set the value of the parameter within the model to be sure I don't send wrong data from the controller B, and it keeps happening. </p>
  
  <p>The query:</p>
  
  <pre><code>$arrConversas = $this-&gt;db-&gt;where_in('codigo_conversa', $codigo_conversa)
                       -&gt;group_by(['codigo_origem','codigo_destino',
                                   'tipo_origem', 'tipo_destino'])
                       -&gt;get('conversa_mensagem')-&gt;result();
  </code></pre>
  
  <p>I think the code isn't wrong because it runs normally from controller A.</p>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Thank you guys. The problem was a procedure that was running before this query, I tried to flush the connection and clean the cache and the problemas was there yet, then I use a <code>$this-&gt;db-&gt;reconnect();</code> .  Not the best solution but this action won't be used everyday.</p>
  
  <p>I saw on the debugging the error: "Commands out of sync; you can't run this command now".</p>
  
  <p>Thanks again!</p>