Пример #1
0
 public function ver($curso_sel)
 {
     Session::set('curso_sel', $curso_sel);
     $c = new Criteria();
     $c->add(CoursePeer::CODE, $curso_sel);
     $this->curso = CoursePeer::doSelectOne($c);
 }
Пример #2
0
 /**
  * Get the associated Course object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Course The associated Course object.
  * @throws     PropelException
  */
 public function getCourse(PropelPDO $con = null)
 {
     if ($this->aCourse === null && ($this->course_id !== "" && $this->course_id !== null)) {
         $c = new Criteria(CoursePeer::DATABASE_NAME);
         $c->add(CoursePeer::ID, $this->course_id);
         $this->aCourse = CoursePeer::doSelectOne($c, $con);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aCourse->addCourseComments($this);
         		 */
     }
     return $this->aCourse;
 }
 protected function getCourse($name)
 {
     $criteria = new Criteria();
     $criteria->add(CoursePeer::NAME, $name);
     return CoursePeer::doSelectOne($criteria);
 }