I started with the ZendSkeletonApplication and added a model extending Zend\Db\TableGateway\TableGateway. I have the following method:
public function findByType($type) {
$rowset = $this->select('type' => $type);
return $rowset;
}
This works, but now if i do this:
$foo = $table->findBytype('foo');
$bar = $table->findBytype('bar');
the first one works, the query it executes is:
SELECT * FROM table WHERE 'type' = 'foo'
The second one however executes the following query:
SELECT * FROM table WHERE 'type' = 'foo' AND 'type' = 'bar'
is this expected behavior? If so how can i have the second time i call the method execute the following query:
SELECT * FROM table WHERE 'type' = 'bar'
thanks in advance!