我正在使用Symfony 1.4和Doctrine 1.2。我有这个问题: 我想在我的原生查询中进行分页。逻辑是这样的:
1-
$statement = Doctrine_Manager::getInstance()->connection();
$query1 = $statement->execute(" SELECT * FROM table1 ");
$query1->fetchAll(PDO::FETCH_ASSOC);
2-
$pager = new sfDoctrinePager('MotherTable', 20);
--- The $query1 that comes as an Assoc array.
$pager->setQuery( $query1 );
$pager->setPage( $request->getParameter('page', 1) );
$pager->init()
有什么想法吗?提前致谢