La fonction :
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| public function movieListAction($page) {
$nbLigne = '3';
//Connexion à la base
$em = $this->getDoctrine()->getEntityManager();
//Création de l'objet et recherche dans la base
$movieList = $em->getRepository('LimeStudioMoviesBundle:Movies')->findBy(array(), null, $page*$nbLigne.', '.$nbLigne, null);
//Déclaration de la page de retour
return $this->render('LimeStudioMoviesBundle:Movie:movieList.html.twig', array(
'moviesList' => $movieList,
)
);
} |
La requête généré :
SELECT t0.movie_id AS movie_id1, t0.movie_title AS movie_title2, t0.movie_releasedate AS movie_releasedate3, t0.movie_synopsis AS movie_synopsis4, t0.movie_poster AS movie_poster5, t0.movie_file AS movie_file6, t0.movie_slug AS movie_slug7, t0.movie_time AS movie_time8, t0.movie_publishdate AS movie_publishdate9 FROM movies t0 LIMIT 3
La condition LIMIT n'est pas complète !
Partager