Hey Parijat, no problem, the query I speak of is documented here (Propel15 - you should be able to use that right away, it's fully compatible). http://www.propelorm.org/wiki/Documentation/1.5/WhatsNew#ModelQueries
Also, the $page variable I just threw in to illustrate. In reality it would look like you describe: $pager = QuestionsQuery::create() -> paginate($request -> getParameter("page", 1)); Thats it, happy coding :) Daniel On Oct 25, 5:34 pm, Parijat Kalia <kaliapari...@gmail.com> wrote: > Daniel...thanks! > Haven't encountered the paginate function as such in the walkthrough I > referred....here is what I did: > $pagerOp = new sfPropelPager('Questions',5); > $pagerOp->setCriteria($c); > $pagerOp->setPage($this->getRequestParameter('page', 1)); > $pagerOp->init(); > > Not sure where the method call you mentioned fits in here. what exactly is > the $page variable supposed to hold. or is that a pre defined variable ??? > Also it isn't a member function of sfPropelPager, so what exactly is $query > that you are mentioning here.... > > Thanks again > > Parijat > > On Mon, Oct 25, 2010 at 10:46 AM, Richtermeister <nex...@gmail.com> wrote: > > Hey there, > > > without knowing exactly what your issue is, if you're using Propel15 > > (as you could and should ;) you can just use $query -> paginate($page, > > $per_page); and that works guaranteed. > > > Daniel > > > On Oct 24, 11:05 pm, Parijat Kalia <kaliapari...@gmail.com> wrote: > > > Hey guys, running into a cheesy error with sf propel pager... > > > as we know... > > > > we can carry out pagination as follows: > > > > $pager = new SFPropelPager('Articles', 5); > > > > My pagination is fine, what's bugging me is the 2nd argument of > > > SFPropelPager, which is the amount of data that can be seen across a > > single > > > page. I have the user specify through > > > a select menu, the total amount of data he expects to be reflected across > > a > > > single page.Each of the answer options correspond to choices, for ,e.g : > > > > 1=>1, 2=>'2', 3=>'3'...etc...so on...basically in my azction, I retrieve > > 1 > > > or 2 or 3 depending on the user choice.this I then send as an argument to > > my > > > pager function, which seemingly does not recognize it. It simply displays > > no > > > data at all./..i.e it will display 0 data when infact I have chosen 10 as > > > the option.. > > > > What's funny is that the way I am sp[ecifiny this default is like: > > > > if(!isset($totalQuestions)) > > > $totalQuestions = 5; > > > > $pager = new SFPropelPager('Articles', $totalQuestions); > > > > the default is working fine, that is in the first case, 4 articles can be > > > seen...but when I hit the query button, and have a post happening, > > although > > > the value is prpagated across the function, it just does not seem to > > work.. > > > > I hope I described this well...please let me know if anyone has any leads > > on > > > this. > > > -- > > 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 symfony-users@googlegroups.com > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en -- 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 symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en