我開始使用ZendSkeletonApplication並添加了一個擴展Zend \ Db \ TableGateway \ TableGateway的模型。 我有以下方法:ZF2 tableGateway select
public function findByType($type) {
$rowset = $this->select('type' => $type);
return $rowset;
}
這工作,但現在如果我這樣做:
$foo = $table->findBytype('foo');
$bar = $table->findBytype('bar');
的第一個作品,它執行的查詢是:
SELECT * FROM table WHERE 'type' = 'foo'
的然而第二個執行以下查詢:
SELECT * FROM table WHERE 'type' = 'foo' AND 'type' = 'bar'
是這種預期的行爲? 如果是的話我怎麼會有我第二次調用該方法執行以下查詢:
SELECT * FROM table WHERE 'type' = 'bar'
在此先感謝!
原來這只是在已經媒體鏈接被固定在最新的github版本ZF2素β3一個小錯誤。 – user458753 2012-04-25 07:43:36