public static function retrieveByTime($time, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(VVisitDeptDailyPeer::DATABASE_NAME); $criteria->add(VVisitDeptDailyPeer::CODE, $time); $v = VVisitDeptDailyPeer::doSelect($criteria, $con); return !empty($v) > 0 ? $v[0] : null; }
public static function retrieveByPK($time_in, $department_id, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(); $criteria->add(VVisitDeptDailyPeer::TIME_IN, $time_in); $criteria->add(VVisitDeptDailyPeer::DEPARTMENT_ID, $department_id); $v = VVisitDeptDailyPeer::doSelect($criteria, $con); return !empty($v) ? $v[0] : null; }