当前位置: 首页>>代码示例>>PHP>>正文


PHP StudentPeer::getTableMap方法代码示例

本文整理汇总了PHP中StudentPeer::getTableMap方法的典型用法代码示例。如果您正苦于以下问题:PHP StudentPeer::getTableMap方法的具体用法?PHP StudentPeer::getTableMap怎么用?PHP StudentPeer::getTableMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StudentPeer的用法示例。


在下文中一共展示了StudentPeer::getTableMap方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getPhpNameMap

 public static function getPhpNameMap()
 {
     if (self::$phpNameMap === null) {
         $map = StudentPeer::getTableMap();
         $columns = $map->getColumns();
         $nameMap = array();
         foreach ($columns as $column) {
             $nameMap[$column->getPhpName()] = $column->getColumnName();
         }
         self::$phpNameMap = $nameMap;
     }
     return self::$phpNameMap;
 }
开发者ID:taryono,项目名称:school,代码行数:13,代码来源:BaseStudentPeer.php

示例2: filterOut

 public function filterOut($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'NAME') {
             $c->addJoin(OutclassCounselingPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $c->addJoin(OutclassCounselingPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'CODE2') {
             $c->addJoin(OutclassCounselingPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE2');
         } elseif ($key == 'YEAR') {
             $c->addJoin(OutclassCounselingPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('YEAR');
         } else {
             $column = OutclassCounselingPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $c->add($name, $value, Criteria::LIKE);
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:42,代码来源:actions.class.php

示例3: filterStudent

 public function filterStudent($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(AcademicCalendarPeer::ID, StudentPeer::ACADEMIC_CALENDAR_ID);
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CLASS_NAME') {
             $c->addJoin(ClassGroupPeer::ID, StudentPeer::CLASS_GROUP_ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'ABSENCE') {
             $column = StudentPeer::getTableMap()->getColumn('CLASS_NAME');
         } else {
             $column = StudentPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 if ($name == StudentPeer::CLASS_GROUP_ID) {
                     $cg = ClassGroupPeer::retrieveByPK($value);
                     $c->add($name, $cg->getChildRecurs(), Criteria::IN);
                 } else {
                     $c->add($name, $value, Criteria::EQUAL);
                 }
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:47,代码来源:actions.class.php

示例4: filterCounseling

 public function filterCounseling($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'NAME') {
             $c->addJoin(ClassCounselingPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $c->addJoin(ClassCounselingPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'CODE2') {
             $c->addJoin(ClassCounselingPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE2');
         } elseif ($key == 'YEAR') {
             $c->addJoin(ClassCounselingPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('YEAR');
         } elseif ($key == 'SUBJECT_NAME') {
             $c->addJoin(ClassCounselingPeer::COURSE_SCHEDULE_ID, CourseSchedulePeer::ID);
             $c->addJoin(CourseSchedulePeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
             $c->addJoin(SubjectCurrPeer::SUBJECT_ID, SubjectPeer::ID);
             $column = SubjectPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'ACADEMIC_CALENDAR_ID') {
             $c->addJoin(ClassCounselingPeer::COURSE_SCHEDULE_ID, CourseSchedulePeer::ID);
             $c->addJoin(CourseSchedulePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $column = AcademicCalendarPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CLASS_NAME') {
             $c->addJoin(ClassCounselingPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = ClassCounselingPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $c->add($name, $value, Criteria::LIKE);
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:54,代码来源:actions.class.php

示例5: filterHistory

 public function filterHistory($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'ACADEMIC_COST_COMPONENT_ID') {
             $c->addJoin(AcademicCostPeer::ACADEMIC_COST_COMPONENT_ID, AcademicCostComponentPeer::ID);
             $c->addJoin(PaymentJournalPeer::ACADEMIC_COST_ID, AcademicCostPeer::ID);
             $column = AcademicCostPeer::getTableMap()->getColumn($key);
         } elseif ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, CurriculumPeer::DEPARTMENT_ID);
             $c->addJoin(CurriculumPeer::ID, AcademicCalendarPeer::CURRICULUM_ID);
             $c->addJoin(AcademicCostPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(PaymentJournalPeer::ACADEMIC_COST_ID, AcademicCostPeer::ID);
             $column = CurriculumPeer::getTableMap()->getColumn($key);
         } elseif ($key == 'PAYER') {
             $c->addJoin(StudentPeer::ID, PaymentJournalPeer::PAYER);
             $c->addJoin(StudentPeer::CURRICULUM_ID, AcademicCalendarPeer::CURRICULUM_ID);
             $c->addJoin(AcademicCostPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(PaymentJournalPeer::ACADEMIC_COST_ID, AcademicCostPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'ACADEMIC_PROCESS_ID') {
             $c->addJoin(PaymentJournalPeer::ID, PaymentHistoryPeer::PAYMENT_JOURNAL_ID);
             $column = PaymentJournalPeer::getTableMap()->getColumn($key);
         } else {
             $column = PaymentHistoryPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             $c2 = null;
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
                 $c2 = $c->getCriterion($name);
             }
             if ($from != '' && $from != null && $to != '' && $to != null) {
                 $c3 = new Criterion($c, $name, $to, Criteria::LESS_EQUAL);
                 $c2->addAnd($c3);
             }
             if (($from == '' || $from == null) && $to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:58,代码来源:actions.class.php

示例6: filterStudent

 public function filterStudent($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(AcademicCalendarPeer::ID, StudentPeer::ACADEMIC_CALENDAR_ID);
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CLASS_NAME') {
             $c->addJoin(ClassGroupPeer::ID, StudentPeer::CLASS_GROUP_ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'ACADEMIC_COST_COMPONENT_ID') {
             $c->addJoin(PaymentJournalPeer::PAYER, StudentPeer::ID);
             $c->addJoin(AcademicCostPeer::ID, PaymentJournalPeer::ACADEMIC_COST_ID);
             $c->addJoin(AcademicCostComponentPeer::ID, AcademicCostPeer::ACADEMIC_COST_COMPONENT_ID);
             $column = AcademicCostComponentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'PAID_AT') {
             $c->addJoin(PaymentJournalPeer::PAYER, StudentPeer::ID);
             $column = PaymentJournalPeer::getTableMap()->getColumn('PAID_AT');
         } elseif ($key == 'STATUS') {
             $c->addJoin(PaymentJournalPeer::PAYER, StudentPeer::ID);
             $column = PaymentJournalPeer::getTableMap()->getColumn('STATUS');
         } elseif ($key == 'PAYMENT_MODEL_ID') {
             $c->addJoin(PaymentJournalPeer::PAYER, StudentPeer::ID);
             $c->addJoin(PaymentModelPeer::ID, PaymentJournalPeer::PAYMENT_MODEL_ID);
             $column = PaymentModelPeer::getTableMap()->getColumn('ID');
         } else {
             $column = StudentPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $c->add($name, $value, Criteria::EQUAL);
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     if ($name == StudentPeer::CLASS_GROUP_ID) {
                         $cg = ClassGroupPeer::retrieveByPK($value);
                         $c->add($name, $cg->getChildRecurs(), Criteria::IN);
                     } else {
                         $c->add($name, $value, Criteria::EQUAL);
                     }
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:57,代码来源:actions.class.php

示例7: filterStudent

 public function filterStudent($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         $column = StudentPeer::getTableMap()->getColumn($key);
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 if ($name == StudentPeer::CLASS_GROUP_ID) {
                     $cg = ClassGroupPeer::retrieveByPK($value);
                     $c->add($name, $cg->getChildRecurs(), Criteria::IN);
                 } else {
                     $c->add($name, $value, Criteria::EQUAL);
                 }
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:36,代码来源:actions.class.php

示例8: filter

 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'ACADEMIC_COST_COMPONENT_ID') {
             $c->addJoin(AcademicCostPeer::ACADEMIC_COST_COMPONENT_ID, AcademicCostComponentPeer::ID);
             $c->addJoin(PaymentJournalPeer::ACADEMIC_COST_ID, AcademicCostPeer::ID);
             $column = AcademicCostPeer::getTableMap()->getColumn($key);
         } elseif ($key == 'PAYER_CODE') {
             $c->addJoin(StudentPeer::ID, PaymentJournalPeer::PAYER);
             $c->addJoin(StudentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(AcademicCostPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(PaymentJournalPeer::ACADEMIC_COST_ID, AcademicCostPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'PAYER') {
             $c->addJoin(StudentPeer::ID, PaymentJournalPeer::PAYER);
             $c->addJoin(StudentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(AcademicCostPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(PaymentJournalPeer::ACADEMIC_COST_ID, AcademicCostPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'DEPARTMENT_ID') {
             $c->addJoin(AcademicCostPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(PaymentJournalPeer::ACADEMIC_COST_ID, AcademicCostPeer::ID);
             $column = AcademicCalendarPeer::getTableMap()->getColumn($key);
         } elseif ($key == 'CLASS_GROUP_ID') {
             $c->addJoin(StudentPeer::ID, PaymentJournalPeer::PAYER);
             $c->addJoin(StudentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(AcademicCostPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(PaymentJournalPeer::ACADEMIC_COST_ID, AcademicCostPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CLASS_GROUP_ID');
         } else {
             $column = PaymentJournalPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER || $creoleType == CreoleTypes::CHAR) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:59,代码来源:actions.class.php

示例9: filter

 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'STUDENT_NAME') {
             $c->addJoin(StudentAbsencePeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'STUDENT_CODE') {
             $c->addJoin(StudentAbsencePeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE');
         } else {
             $column = StudentAbsencePeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:43,代码来源:actions.class.php

示例10: filter

 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'STUDENT_NAME') {
             $c->addJoin(StudentPeer::ID, InboxPeer::STUDENT_ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(EmployeePeer::ID, InboxPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } else {
             $column = InboxPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::DATE) {
             $c->add($name, $value, Criteria::LIKE);
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:32,代码来源:actions.class.php

示例11: filter

 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'CURRICULUM_ID') {
             $c->addJoin(ComprehensiveExamPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn($key);
         } elseif ($key == 'EMPLOYEE_ID') {
             $c->addJoin(ComprehensiveReviewerPeer::COMPREHENSIVE_EXAM_ID, ComprehensiveExamPeer::ID);
             $column = ComprehensiveReviewerPeer::getTableMap()->getColumn($key);
         } elseif ($key == 'DEPARTMENT_ID') {
             $c->addJoin(ComprehensiveExamPeer::STUDENT_ID, StudentPeer::ID);
             $c->addJoin(CurriculumPeer::ID, StudentPeer::CURRICULUM_ID);
             $c->addJoin(StudentPeer::CURRICULUM_ID, CurriculumPeer::ID);
             $column = CurriculumPeer::getTableMap()->getColumn($key);
         } else {
             $column = ComprehensiveExamPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:45,代码来源:actions.class.php

示例12: filterAbsence

 public function filterAbsence($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $c->addJoin(StudentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(StudentAbsencePeer::STUDENT_ID, StudentPeer::ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CODE_CLASS') {
             $c->addJoin(StudentAbsencePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $c->addJoin(StudentAbsencePeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'NAME') {
             $c->addJoin(StudentAbsencePeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = StudentAbsencePeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $c->add($name, $value, Criteria::LIKE);
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:44,代码来源:actions.class.php

示例13: filterPayment

 public function filterPayment($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'NAME') {
             $c->addJoin(VMonthlyPaymentPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $c->addJoin(VMonthlyPaymentPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'USER_NAME') {
             $c->addJoin(VMonthlyPaymentPeer::USER_ID, UserPeer::ID);
             $column = UserPeer::getTableMap()->getColumn('LOGIN');
         } else {
             $column = VMonthlyPaymentPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             $c2 = null;
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
                 $c2 = $c->getCriterion($name);
             }
             if ($from != '' && $from != null && $to != '' && $to != null) {
                 $c3 = new Criterion($c, $name, $to, Criteria::LESS_EQUAL);
                 $c2->addAnd($c3);
             }
             if (($from == '' || $from == null) && $to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $from = $value['from'];
                 $to = $value['to'];
                 $c2 = null;
                 if ($from != '' && $from != null) {
                     $c->add($name, $from, Criteria::GREATER_EQUAL);
                     $c2 = $c->getCriterion($name);
                 }
                 if ($from != '' && $from != null && $to != '' && $to != null) {
                     $c3 = new Criterion($c, $name, $to, Criteria::LESS_EQUAL);
                     $c2->addAnd($c3);
                 }
                 if (($from == '' || $from == null) && $to != '' && $to != null) {
                     $c->add($name, $to, Criteria::LESS_EQUAL);
                 }
                 #$c->add($name, $value, Criteria::LIKE );
             } else {
                 if ($creoleType == CreoleTypes::INTEGER || $creoleType == CreoleTypes::NUMERIC || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:66,代码来源:actions.class.php


注:本文中的StudentPeer::getTableMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。