我开始使用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