How To Create Pagination In Yii

I have created pagination in my application.But i don’t how to set limit using create Command :unsure:

Plz help me :(

just read CPagination API reference:

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 $ how to set limit using createCommand :-[

you can do this manually then:



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?