I have the following that is to fetch only records that have the field "loan_cycle_number" = 0; yet it still fetches all the records. I have googled all I can and still no solution found:
$groups = new Application_Model_GroupsMapper();
$db = $groups->getDbTable()->select();
$select->where('loan_cycle_number = ?', 0);
$rows = $groups->fetchAll($select);
the getDbTable method is like so
public function getDbTable()
{
if (null === $this->_dbTable) {
$this->setDbTable('Application_Model_DbTable_Groups');
}
return $this->_dbTable;
}
Thanks