-1
I am in this SQL, recovering the records (number of vendors per city) of a table and I would like to count how many records have in each city. I want to put something like Tal City (9). I will put a print of the result of this SQL to help you better view the question:
public function getFornsRegion($code)
{
$this->db->select("fe.*");
$this->db->from("fornecedores_empresa AS fe");
$this->db->where("fe.regiao", $code);
$this->db->group_by("fe.cidade");
return $this->db->get()->result_array();
}
Tried to
$this->db->select("count(fe.cidade)");
?– Erlon Charles