示例#1
0
 public function getEspais()
 {
     $RET = array();
     $con = Propel::getConnection();
     $stmt = $con->createStatement();
     $idA = $this->getActivitatid();
     $SQL = "\r\n               SELECT E.*\r\n                 FROM espais E, horarisespais HE, horaris H \r\n                WHERE H.Activitats_ActivitatID = {$idA} \r\n                  AND H.HorarisID = HE.Horaris_HorarisID \r\n                  AND HE.Espais_EspaiID = E.EspaiID\r\n                  GROUP BY E.Nom\r\n                  ";
     $rs = $stmt->executeQuery($SQL, ResultSet::FETCHMODE_NUM);
     foreach (EspaisPeer::populateObjects($rs) as $E) {
         $RET[] = $E->getNom();
     }
     return $RET;
 }
 /**
  * Method to do selects.
  *
  * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
  * @param      PropelPDO $con
  * @return     array Array of selected Objects
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelect(Criteria $criteria, PropelPDO $con = null)
 {
     return EspaisPeer::populateObjects(EspaisPeer::doSelectStmt($criteria, $con));
 }