I have this query
$query=$db->query("select empleado,count(*) as v
from empleado
inner join oficinas on
empleado.numero=oficinas.numero");
Does someone tell me what I'm doing wrong ?? : 3
The case is the following .. I have a table of employees and another of offices. There are 7 registered offices (in the office table, with different ids of course), and there are 12 employees that belong to one office each. Several of them belong to the same office. But for example, in the office table office 8 is registered but there is no employee in office 8, do you understand me? So since there is no employee in office 8, I do not want to show that record .. I want to show only the employees that belong to an office. Actually I want to show how many employees each office has, but the offices that have employees as well .. But this query did not work for me. : c someone give me a hand please:)