I would like to add a where clause with this method.
public function fetchAll()
{
$resultSet = $this->select();
return $resultSet;
}
I have added like this.
public function fetchAll()
{
$resultSet = $this->select();
$resultSet->where("status = ?", 1);
return $resultSet;
}
But, it shown the below error.
Fatal error: Call to undefined method Zend\Db\ResultSet\ResultSet::where()
Could you please help me to add WHERE, OR WHERE, GROUP and ORDER with above mentioned method.
statusa field name here? - KenzoTableGateway? - Sam$where = new \Zend\Db\Sql\Where(); //do more!to$this->select($where). See framework.zend.com/manual/2.0/en/modules/… Also: start to read the manual, please! This is explained, see framework.zend.com/manual/2.0/en/modules/… - Sam