0
3框架并想做简单的sql。我有这样的功能,但问题是,我输出 “SELECT listings
。* FROM listings
WHERE listings_id
='1'LIMIT'1'”我不想在第一个列表后选择我想要所有的列。Zend 2 sql查询问题
static $tableName = 'listings';
public function getListingsById($id){
$select = new Select();
$select->from(self::$tableName);
$where = new Where();
$where->equalTo('listings_id', $id);
$select->where($where);
$select->limit(1);
echo $select->getSqlString($this->getAdapter()->getPlatform());
return $this->selectWith($select);
}