public function executeGetList() { if ($this->hasRequestParameter('category_name') && $this->getRequestParameter('category_name') != '') { $name = $this->getRequestParameter('category_name'); $c = new Criteria(); $c->add(BudgetCategoryPeer::NAME, "%{$name}%", Criteria::LIKE); $this->rows = BudgetCategoryPeer::doSelect($c); } }
public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(BudgetCategoryPeer::ID, $pks, Criteria::IN); $objs = BudgetCategoryPeer::doSelect($criteria, $con); } return $objs; }