Example #1
0
 public function cudPlayer($player, $action)
 {
     if (isset($player)) {
         $query = "";
         if (strcasecmp($action, CREATE) == 0) {
             //add team record
             $query = " dbo.SP_CREATE_PLAYER '" . $player->get_fname() . "','" . $player->get_lname() . "','" . $player->get_height() . "','" . $player->get_weight() . "','" . $player->get_gender() . "','" . $player->get_dob() . "','" . $player->get_email() . "','" . $player->get_teamId() . "'";
         } else {
             if (strcasecmp($action, UPDATE) == 0) {
                 //update team record
                 $query = " dbo.SP_UPDATE_PLAYER '" . $player->get_fname() . "','" . $player->get_lname() . "','" . $player->get_height() . "','" . $player->get_weight() . "','" . $player->get_gender() . "','" . $player->get_dob() . "','" . $player->get_teamId() . "','" . $player->get_email() . "','" . $player->get_playerId() . "'";
             } else {
                 if (strcasecmp($action, DELETE) == 0) {
                     //delete team record
                     //$query = " dbo.SP_DELETE_PLAYER '".$player->get_email()."','".$player->get_teamName()."'";
                     $query = " dbo.SP_DELETE_PLAYER '" . $player->get_playerId() . "'";
                 }
             }
         }
         $result = parent::processCUD($query, $action);
         //or use $this->
         return $result;
     } else {
         return ERROR;
     }
 }
Example #2
0
 public function cudTeam($team, $action)
 {
     if (isset($team)) {
         $query = "";
         if (strcasecmp($action, CREATE) == 0) {
             //add team record
             $query = " dbo.SP_CREATE_TEAM '" . $team->get_teamName() . "','" . $team->get_coachEmailAddress() . "'";
         } else {
             if (strcasecmp($action, UPDATE) == 0) {
                 //update team record
                 $query = " dbo.SP_UPDATE_TEAM '" . $team->get_oldTeamName() . "','" . $team->get_teamName() . "','" . $team->get_coachEmailAddress() . "'";
             } else {
                 if (strcasecmp($action, DELETE) == 0) {
                     //delete team record
                     $query = " dbo.SP_DELETE_TEAM '" . $team->get_teamName() . "'";
                 }
             }
         }
         $result = parent::processCUD($query, $action);
         //or use $this->
         //  echo 'Result in TeamDAO='.$result;
         return $result;
     } else {
         return ERROR;
     }
 }
Example #3
0
 public function cudCoach($coach, $action)
 {
     if (isset($coach)) {
         $query = "";
         if (strcasecmp($action, CREATE) == 0) {
             //add coach record
             $query = " dbo.SP_CREATE_COACH '" . $coach->get_fname() . "','" . $coach->get_lname() . "','" . $coach->get_emailAddress() . "','" . $coach->get_password() . "'";
         } else {
             if (strcasecmp($action, UPDATE) == 0) {
                 //update coach record
                 $query = " dbo.SP_UPDATE_COACH '" . $coach->get_fname() . "','" . $coach->get_lname() . "','" . $coach->get_oldEmailAddress() . "','" . $coach->get_emailAddress() . "','" . $coach->get_password() . "'";
             } else {
                 if (strcasecmp($action, DELETE) == 0) {
                     //delete coach record
                     $query = " dbo.SP_DELETE_COACH '" . $coach->get_emailAddress() . "'";
                 }
             }
         }
         $result = parent::processCUD($query, $action);
         //or use $this->
         //   echo 'Result in CoachDAO='.$result;
         return $result;
     } else {
         return ERROR;
     }
 }
Example #4
0
 public function cudRegistration($registration, $action)
 {
     if (isset($registration)) {
         //  print_r($registration);
         $query = "";
         if (strcasecmp($action, CREATE) == 0) {
             //add registration record
             $query = " dbo.SP_CREATE_REGISTRATION '" . $registration->get_teamId() . "','" . $registration->get_tournamentId() . "'";
         } else {
             if (strcasecmp($action, UPDATE) == 0) {
                 //update registration record
                 $query = " dbo.SP_UPDATE_REGISTRATION '" . $registration->get_teamName() . "','" . $registration->get_tournamentName() . "','" . $registration->get_newTournamentName() . "'";
             } else {
                 if (strcasecmp($action, DELETE) == 0) {
                     //delete registration record
                     $query = " dbo.SP_DELETE_REGISTRATION '" . $registration->get_teamName() . "','" . $registration->get_tournamentName() . "";
                 }
             }
         }
         $result = parent::processCUD($query, $action);
         return $result;
     } else {
         return ERROR;
     }
 }
Example #5
0
 public function addFilter(&$query, $id, $active, $email, $date, $date_symbol)
 {
     if ($id !== NULL) {
         $query .= " AND id = '" . DataHandler::forceInt($id) . "'";
     }
     if ($active !== NULL) {
         $query .= " AND `active` = '" . DataHandler::forceInt($active) . "'";
     }
     if ($email !== NULL) {
         $query .= " AND `email` = '" . DataHandler::forceString($email) . "'";
     }
     if ($date !== NULL) {
         $date_symbol = parent::compareSimble($date_symbol);
         $date = parent::dateHandlerScape(DataHandler::convertDateToDB($date));
         $query .= " AND `date` {$date_symbol} {$date} ";
     }
 }
 public function NearestDriverDataDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function UserLoginDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function UserReviewDataDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function SensorsInRoomDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function TaxiServiceProviderDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function UserRoomsLoadDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
Example #12
0
	public function __construct()
	{
		parent::__construct('comment');
	}
 public function WishListDetailsDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function PollutionSensorDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function AddCustomerDetailslDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
Example #16
0
 /**
  * Actualizar el estado de �ltimo error ejecutado hacia la base datos
  * @param Exception $pError Objeto con el Error ocurrido
  */
 private function ActualizarEstadoError($pError)
 {
     //Actualizar el estado del error
     parent::setHayError(True);
     parent::setDescripcionError($pError);
 }
Example #17
0
 public function __construct()
 {
     parent::__construct('members');
 }
 public function InsertDeviceSensorsValueDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function FilterPetMateListDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
Example #20
0
 public function MyListingDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function IndexPageCityLoadDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
Example #22
0
 /**
  * @desc 对象实例重用
  * @param string $className
  * @return EbayItemDAO
  */
 public static function getInstance($className = __CLASS__)
 {
     return parent::createInstance($className);
 }
 public function OutStationCityLoadDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function PetCategoriesDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
Example #25
0
 /**
  * clona un concepto del tipo analisis. 
  * @return (object) concepto clonado 
  */
 protected function clonar($concepto, $toParent, $modelo)
 {
     $flagCustomPrecio = isset($concepto->customPrecio) && $concepto->customPrecio;
     unset($concepto->customPrecio);
     $copia = clone $concepto;
     unset($copia->id);
     $copiaSaved = parent::save($this->filterToSave($copia));
     $copia->id = $copiaSaved->id;
     // copia relacion con el padre
     if (isset($toParent)) {
         $this->insertRelation($toParent, $copia, $modelo);
     }
     // copia relaciones con los hijos sii no tiene un precio customizado
     if (!$flagCustomPrecio) {
         if (isset($modelo)) {
             $query = "insert into " . $this->fromRelaciones . " (id_sup,id_inf,id_modelo,custom_nombre,cantidad,factor) " . " select ? as id_sup,id_inf,id_modelo,custom_nombre,cantidad,factor FROM " . $this->fromRelaciones . " where id_sup = ?";
         } else {
             $query = "insert into " . $this->fromRelaciones . " (id_sup,id_inf,custom_nombre,cantidad,factor) " . " select ? as id_sup,id_inf,custom_nombre,cantidad,factor FROM " . $this->fromRelaciones . " where id_sup = ?";
         }
         DB::prepareExecute($query, array($copia->id, $concepto->id));
     }
     return $copia;
 }
 public function PetServiceFeedbackDetailsDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
Example #27
0
 function messagesDAO($dbMng)
 {
     parent::BaseDAO($dbMng);
 }
Example #28
0
 public function __construct()
 {
     parent::__construct();
 }
 public function ClinicDetailsDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }
 public function ForgotPasswordDAO()
 {
     $baseDAO = new BaseDAO();
     $this->con = $baseDAO->getConnection();
 }