-2
I have this Function to group values of two tables "sales" and "customers", but in addition to grouping this information, I need to perform a search in the database according to the parameters. I can’t put the two together, I run only one at a time. How to do?
function getVendas()
{
$this->db->select('vendas.*, clientes.nomeCliente');
$this->db->from('vendas');
$this->db->join('clientes', 'clientes.idClientes = vendas.clientes_id');
$this->db->limit(10);
return $this->db->get()->result();
}
function getVendas()
{
$sql = "SELECT * FROM vendas WHERE dataVenda BETWEEN CURRENT_DATE()-7 AND CURRENT_DATE() AND faturado = 0";
return $this->db->query($sql)->result();
}
What is the name of the DB engine and what is the name of the DB access lib?
– Augusto Vasques