php - Propel paginate() method doesn't work as expected -


i'm trying pagination in website i'm developing. found propel has paginate() method useful doing cannot make work.

here's code:

$pager = elementquery::create()->paginate($page = 1, $maxperpage = 10); 

$pager should have following methods, propel's official documentation:

$pager->getnbresults();   // total number of results if not paginated $pager->havetopaginate(); // return true if total number of results exceeds maximum per page $pager->getfirstindex();  // index of first result in page $pager->getlastindex();   // index of last result in page 

and should able this:

$links = $pager->getlinks(5); 

but i'm getting element class methods.

am missing something?

here's got information pagination (to find fast press ctrl + f , type paginate())

thanks.

if let me auto-answer question... seems methods mentioned there, reason don't appear on netbeans editor when write $pager->

i don't know if counts answer "problem" "solved"...


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -