I have created pagination in my application.But i don’t how to set limit using create Command
Plz help me
I have created pagination in my application.But i don’t how to set limit using create Command
Plz help me
just read CPagination API reference: http://www.yiiframework.com/doc/api/1.1/CPagination
there is even example on how to apply limit on criteria object…
Thank you for your quick reply .But my problem here is i don’t have model(i mean it is an dynamic model)so i’m using createCommand instead of $criteria.so how to set limit using createCommand
you can do this manually then:
$pagination->getLimit();
$pagination->getOffset();
It is not required to use $model in CPagination.
CPagination has also getter and setter to manipulete the current Page
iam trying to paginate datas coming from database but i get this error>>
YiiBase::include(Article.php) [<a href=‘yiibase.include’>yiibase.include</a>]: failed to open stream: No such file or directory <<
can anyone help?