hey guys, I have the following code:

Code:
// Get Topic & Left Join Posts
		$q = Doctrine_Query::create()
			->from('TblFTopic t')
			->leftJoin('t.tblFPosts p')
			->leftJoin('p.tblUser u')
			->where('t.TopicID = ?', $this->tid)
			->orderBy('p.PostID');		
		
		$perPage = 2;
		$numPageLinks = 20;

		// initialize pager
		$pager = new Doctrine_Pager($q, $this->PageNo, $perPage);

		// execute paged query
		$result = $pager->execute(array(), Doctrine::HYDRATE_ARRAY);

		// initialize pager layout
		$pagerRange = new Doctrine_Pager_Range_Sliding(array('chunk' => $numPageLinks), $pager);
		$pagerUrlBase = $this->view->url(array("page" => $this->Page), 'ftopic') . "/{%page}";
		$pagerLayout = new Doctrine_Pager_Layout($pager, $pagerRange, $pagerUrlBase);

		// set page link display template
		$pagerLayout->setTemplate('<a href="{%url}">{%page}</a>');
		$pagerLayout->setSelectedTemplate('<span class="current">{%page}</span>');
		$pagerLayout->setSeparatorTemplate('&nbsp;');

		// set view variables
		$this->view->pages = $pagerLayout->display(null, true);
$this->view->pages only contains one page, and $result contains 8 records (which is over the perpage variable).

$this->PageNo currently contains the value of 1

Any idea why this isn't working?