Error no resultado
A PHP Error was encountered Severity: 4096
Message: Object of class stdClass could not be converted to string
MODEL:
public function consultaMC($VENDEDOR,$dataInicial, $dataFinal){
$this->db->select('count(*)');
$this->db->from('funcionario a');
$this->db->join('rup r', 'r.CPFCNPJ = a.CPFCNPJVENDEDOR');
$this->db->join('rup v', 'v.CPFCNPJ = a.CPFCNPJ');
$this->db->where("a.CPFCNPJVENDEDOR = $vendedorand v.DTHRINSERT BETWEEN '{$dataInicial}' AND '{$dataFinal}' ");
$this->db->group_by('a.CPFCNPJVENDEDOR, month(v.DTHRINSERT), year(v.DTHRINSERT)');
$this->db->order_by('a.CPFCNPJSVENDEDOR, month(v.DTHRINSERT)');
$result = $this->db->get();
return $result->result();
}
CONTROLLER
$dbModel = new Model_vendas();
$Supprodutos = $dbModel->getVendedorrProduto($conditionWhere);
foreach($Supprodutos as $suprodutos){
$suprodutos->QtM_Cadastrada = $dbModel->consultaMC($suprodutos->Vendedor $dataInicial, $dataFinal);
$retorno .= "<tr>
<td align=center>{$suprodutos->NOME_VENDEDOR}</td>
<td align=center>{$suprodutos->MES}</td>
** <td align=center>{$suprodutos->QtM_Cadastrada[0]}</td>**
** essa linha em vermelho que esta dando o erro.
Obrigado galera !!!
Discussão (1)
Carregando comentários...