On Tue, 25 May 2010, Parijat Kalia wrote:
> I am trying to implement pagination. My actions page has this simple query
> * $c = new Criteria();
> $c->add(QuestionsPeer::USERNAME,$userName);
> $c->addSelectColumn(QuestionsPeer::QUESTION);*
> $pagerOp = new sfPropelPager('Questions',15);
> $pagerOp->setCriteria($c);
> $pagerOp->setPage($this->getRequestParameter('page', 10));
Then second parameter to getRequestParameter() is a default value. Did you
mean to start at page 10 when no page parameter exists.
> $pagerOp->init();
> $this->pager = $pagerOp;
>
> Now in the templates, I am trying to check my the results of my pager, by
> doing this
>
> echo "<pre>"; print_r($pager->getResults()) ; echo "</pre>";
>
> The output I should be getting should only be the *questions by
> username=$userName* but this is not the case, and apparently everything is
> getting out as output also, they are being outputted as protected variables,
> meaning I cannot access them, which is the core problem here......this can
> be seen as follow:
> (Anyone know what's up here? please let me know...thanks!)
Go read the example in the docs:
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/07#chapter_07_list_pagination
p.s. Dont post to mailing lists in HTML.
--
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en