1
use Zend\Db\TableGateway\TableGateway;
use Zend\Db\TableGateway\AbstractTableGateway;
use Zend\Db\TableGateway\Feature;
use Zend\Db\Sql\Select;
use Zend\Session\Container;
嗨,我是新來的ZF2,我無法迴應它。Zend Framework從數據庫檢索值
$rowset = $this->tableGateway->select(array('id' => $id));
$row = $rowset->current();
echo $row->name;
var_dump($ row)的內容是什麼? –
你有數據庫中的「名稱」字段嗎? –
是啊有名字字段.... –