我想将控制器更改为可以从两列(id,number)中选择
public function invalidcustomersAction()
{
$smsModel = new Model_SimInCust();
$select = $smsModel->select();
$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbTableSelect($select));
$paginator ->setItemCountPerPage(5)
->setCurrentPageNumber($this->_getParam('page',1));
$this->view->paginator = $paginator;
}
我的模特已经有了这个
<?php
class Model_SimInCust extends Zend_Db_Table_Abstract
{
protected $_name = 'invalid';
protected $_schema = 'invalid_sim';
}
答案 0 :(得分:1)
将选择编辑为:
$select = $smsModel->select()->from($smsModel, array('id','number'));