0
Sirs. I have the following function.
$sql = "
SELECT
c.*,
cli.*,
cli.razaosocial as nomeCliente,
c.idCliente as idClienteChamada
FROM
chamada as c,
cliente as cli
WHERE
c.idChamada = '".$id."'
AND
cli.idCliente = c.idCliente
";
$consulta = $this->db->query($sql)->result();
foreach($consulta as &$valor)
{
$sql = "
SELECT
c.*,
cli.*,
f.idFuncionario,
f.*
FROM
chamada as c, cliente as cli, funcionario as f
WHERE
c.idCliente = '".$valor->idClienteChamada."'
AND
cli.idCliente = '".$valor->idClienteChamada."'
AND
c.idFuncionario = f.idFuncionario
OR
c.idFuncionario = (NULL)
";
$valor->listaClientesView = $this->db->query($sql)->result();
}
I would like to list ALL calls even if you don’t have the function inside the call It lists all, according to the client, however, if it does not have a valid completed ID, it does not list that record
I couldn’t understand about the security issue. Can you give me more details? So I won’t miss more :))
– Sr. André Baill
@Andrébaill I updated the answer by talking about the concatenation problem
– Maicon Carraro