1
Good afternoon, I have a procedure to run on sql server, if I run directly on SQL it runs normally, returning me the expected line as in the image below:
but when I run codeIgniter 3 (php) it doesn’t error but also brings my Row.
controller:
$result = $this->posvendas->totalPassagens([getCodeLocal($local), date('Y-m-01 00:00:00'), date('Y-m-d 23:59:59')]); // Não esta retornando a consulta
echo '<prev>';
print_r($result);
Model:
public function totalPassagens(array $array)
{
$params = [
3562,
0,
'2020-10-01 00:00:00',
'2020-10-30 23:59:59'
];
$sql = "SET NOCOUNT ON exec whRelOSTotalizarResultadoAgendamento ?, ?, ?, ?";
$data = $this->db->query($sql, $params);
return $data->result_array();
}
Exit:
I don’t understand why not return the results
The answer answered your question?
– novic