フィールドに特定の値があるデータベースからいくつかの行を取得しようとしています。私はこのコードを試しました:
public function getJewelrybyCollection($collection)
{
$rowset = $this->tableGateway->select(array('collection' => $collection));
$row = $rowset->current();
if (!$row) {
throw new \Exception("Could not find collection $collection");
}
return $row;
}
これは機能していますが、 var を返そ$row = $rowset->current();
うとしたため、1 行しか取得していませんが、良い結果は得られませんでした。$rowset
ZF2初心者です
ありがとうございました