Skip to content

Commit

Permalink
Merge pull request #34 from Dev2Choiz/master
Browse files Browse the repository at this point in the history
top recette
  • Loading branch information
NailaMelhem committed Apr 12, 2015
2 parents 5363749 + 0a03f5c commit 1c34278
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Application/Controllers/ViewRecette.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,20 @@ public function getAllViewRecettes($param) { // obtenir toutes les recettes

//si on cherche a recevoir qu'un les recettes d'une categorie...
$where=" 1 ";

if(isset($param['id_cat']) && !empty($param['id_cat']) ){
$where=" `id_cat`={$param['id_cat']} ";
echo "tri selon la categorie";
echo "tri selon la categorie";
}

else if(isset($param['top']) && !empty($param['top']) ){
$where=" `top`='1' OR `top`='2' OR `top`='3' ";
echo "tri selon le top";
}
unset($param['method'], $param['id_cat']);

unset($param['method'], $param['id_cat'], $param['top']);

echo "coucou : ".$where;

var_dump("getAllViewRecettes");
$modelViewAllRecette = new \Application\Models\ViewRecette();
Expand Down Expand Up @@ -98,6 +105,11 @@ public function getAllViewRecettes($param) { // obtenir toutes les recettes
//recupere les commentaires
$modelVC = new \Application\Models\ViewCommentaire();

//$modelNote = new \Application\Models\Note();

//$notes=$modelNote->convEnTab($modelNote->fetchAll(" "));


foreach ($viewAllRecettes as $key => $viewRecette) {

$viewC = $modelVC->convEnTab( $modelVC->fetchAll(" `id_recette`={$viewRecette['id_recette']}")) ;
Expand Down

0 comments on commit 1c34278

Please sign in to comment.