Hi!
please helm me..I read guide about search form and I see how paginate serch result http://doc.silverstripe.org/doku.php?id=tutorial:4-site-search
Now I have a function Conn() that take data from external database (243). I need show 10 result for page. Function that count page number work good (25 pages), but all my data(243) are show in all 25 pages, so they aren't sort in my 25 pages.
this is my function:
function Conn()
{ global $db_pandora;
$record=$db_pandora->query('SELECT * FROM mm_ville');
$rec=array();
while($rec[]=$record->nextRecord())
{
}
$doSet = new DataObjectSet();
foreach($rec as $key)
{
$record = array(
'Id' => $key['id'],
'Nome' => $key['name'],
);
$doSet->push(new ArrayData($record));
}
return $doSet;
}