I have a query that brings all the users of the database, but I need to make a comparison with another table in which there is no relationship. I do everything through php but I need to join the data from the other table with the first one, that is, having everything.
Code:
$instructores = array();
$instructoresActivos = $this->Usuario->query("select * from usuarios");
$fechas = $this->Usuario->query("select * from fechas");
foreach($instructoresActivos as $instructorActivo){
$instructores = array_merge($instructorActivo,$instructores);
}
The problem is that it only brings me the first record and I do not know why. Any solution? Thanks.