Commit e5ae98bf authored by Kbida Vincent's avatar Kbida Vincent

construction de toutes les requêtes

parent 47a58436
......@@ -9,41 +9,47 @@ use bdd\models\platform;
class ControleurRequete{
public function selectMario(){
$jeu = \bdd\models\game::select('name')->where('name','like','%Mario%','or','alias','like','%Mario%')->get();
/*
TODO
Il faut faire l'adaptation de la requête à la vue;
AKA créer la vue puis la rendre en html;
$vue = new \bdd\vues\ ...
$vue = new \bdd\vue\RequeteVue($jeu);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
*/
}
public function selectCompanyCountry(){
$company = \bdd\models\company::select('name')->where('location_country','like','%Japan%')->get();
/*TODO
pareil que la première méthoden besoin de la vue pour faire le rendu
$vue = new \bdd\vues\ ...
$html = $vue->render(2);
$vue = new \bdd\vue\RequeteVue($company);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
*/
}
public function selectPlatformBase(){
$platform = \bdd\models\platform::select('name')->where('install_base','>','10000000')->get();
/*TODO
encore une fois, besoin de vue pour rendu
$vue = new \bdd\vues\ ...
$html = $vue->render(3);
$vue = new \bdd\vue\RequeteVue($platform);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
}
public function selectGameNumber(){
$game = \bdd\models\game::select('name')->orderBy('name')->limit('21173','422')->get();
$vue = new \bdd\vue\RequeteVue($game);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
*/
}
public function selectPage($p){
$p = ($p-1)*500;
$jeu = \bdd\models\game::select('id','name')->orderBy('id')->limit($p,'500')->get();
$vue = new \bdd\vue\RequeteVue($jeu);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment