Skip to content

Instantly share code, notes, and snippets.

@danilosantosdev
Created June 1, 2015 18:30
Show Gist options
  • Save danilosantosdev/18ea1c758fc3ee7fec36 to your computer and use it in GitHub Desktop.
Save danilosantosdev/18ea1c758fc3ee7fec36 to your computer and use it in GitHub Desktop.
Busca
$buscas_agrupadas_clique = $this->Busca->find("all", array("conditions" => $conditions, "order" => "Busca.id DESC", "group" => "Busca.clique_id" ));
$buscas = array();
foreach($buscas_agrupadas_clique as $index => $bac):
$buscas[] = $this->Busca->find("all", array(
"conditions" => array(
"Busca.clique_id" => $bac["Busca"]["clique_id"]
)
));
$buscas_agrupadas_clique[$index]['Busca']['companhias'] = @$buscas[$index][0]['Busca']['companhia_aerea'] . ", " . @$buscas[$index][1]['Busca']['companhia_aerea'] . ", " . @$buscas[$index][2]['Busca']['companhia_aerea'];
endforeach;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment