public function trypaginatorAction(){
{
$GETDATA = new Model_Managers_Paginator();
$getdata = $GETDATA->simplepaginator();
//require_once 'Zend_Paginator_Adapter_Interface.php';
//require_once 'Zend/Db.php';
//require_once 'Zend/Db/Select.php';
// require_once 'Zend_Paginator_Adapter_DbSelect.php';
$paginator = new Zend_Paginator(new Zend_Paginator_Adaptor_DbSelect($getdata));
$paginator->setItemCountPerPage(25)
->setCurrentPageNumber($this->_getParam('page',1));
$this->view->paginator = $paginator;
}
View:
<?php
foreach($this->paginator as $paginator){
echo $paginator['DOCUMENT_ID'].' has Title: '.$paginator['SUBJECT'].'<BR>';
}
?>
Model:
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
class Model_Managers_Paginator{
public function simplepaginator(){
// require_once 'Zend/Paginator/Adapter/DbSelect.php';
$db = Zend_Db_Table::getDefaultAdapter();
$getdata = new Zend_Db_Select($db);
$getdata->from('ARC_DOCUMENT')
->where('DELETED=0');
}
}
?>
Hi,
I went through the TUTORIAL from Youtube and followed as exactly as it is. Following is the link for the video;
I went through the TUTORIAL from Youtube and followed as exactly as it is. Following is the link for the video;
http://www.youtube.com/watch?v=f4fujot7Xlc
Even after understanding the logic in the video and following it exactly, Facing this problem;
Warning: include(Zend\Paginator\Adaptor\DbSelect.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\ZCFPRD\library\Zend\Loader.php on line 136Even after understanding the logic in the video and following it exactly, Facing this problem;
Warning: include() [function.include]: Failed opening 'Zend\Paginator\Adaptor\DbSelect.php' for inclusion (include_path='C:\wamp\www\ZCFPRD\library;.;C:\php5\pear') in C:\wamp\www\ZCFPRD\library\Zend\Loader.php on line 136
Fatal error: Class 'Zend_Paginator_Adaptor_DbSelect' not found in C:\wamp\www\ZCFPRD\application\controllers\DocumentsController.php on line 2144
I face this problem quite often but it slips off my brain how to cater it. Can someone please explain to me why I face this problem and what exactly I should do when I face it.
Please find the attached file to see my code.
Your earliest reply awaited
--
Regards,
YD
没有评论:
发表评论