public function deleteByFormIdUserId($userId, $formId)
 {
     $sql = 'DELETE FROM teamroom_push_forms.user_forms WHERE user_id = ? AND form_id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($userId);
     $sqlQuery->setNumber($formId);
     return $this->executeUpdate($sqlQuery);
 }
 public function baja($id)
 {
     $sql = 'UPDATE usuarios SET b_borrado = ? WHERE id_usuario = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber("1");
     $sqlQuery->setNumber($id);
     return $this->executeUpdate($sqlQuery);
 }
 /**
  * Delete record from table
  * @param skill primary key
  */
 public function deleteUserSkill($id, $userId)
 {
     $sql = 'DELETE FROM user_skills WHERE id = ? AND user_id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($id);
     $sqlQuery->setNumber($userId);
     return $this->executeUpdate($sqlQuery);
 }
 /**
  * Update record in table
  *
  * @param RelacionAmigosMySql relacionAmigo
  */
 public function update($relacionAmigo)
 {
     $sql = 'UPDATE relacion_amigos SET fecha_amistad = ? WHERE id_usuario1 = ?  AND id_usuario2 = ? ';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($relacionAmigo->fechaAmistad);
     $sqlQuery->setNumber($relacionAmigo->idUsuario1);
     $sqlQuery->setNumber($relacionAmigo->idUsuario2);
     return $this->executeUpdate($sqlQuery);
 }
 /**
  * Update record in table
  *
  * @param WorkingLocationsMySql workingLocation
  */
 public function update($workingLocation)
 {
     $sql = 'UPDATE working_locations SET location_name = ?, added_on = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($workingLocation->getLocationName());
     $sqlQuery->set($workingLocation->getAddedOn());
     $sqlQuery->setNumber($workingLocation->getId());
     return $this->executeUpdate($sqlQuery);
 }
 public function queryUsuarioEvento($idUsuario, $idEvento)
 {
     $sql = 'SELECT DISTINCT e.* FROM evento AS e ';
     $sql .= ' INNER JOIN campania AS c ON c.id = e.campania_id';
     $sql .= ' INNER JOIN empresa AS e ON e.id = c.empresa_id OR e.id = c.empresa_distribuidora_id ';
     $sql .= ' INNER JOIN usuario_empresa AS ue ON e.id = ue.empresa_id';
     $sql .= ' WHERE ue.usuario_id = ? AND e.id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($idUsuario);
     $sqlQuery->setNumber($idEvento);
     return $this->getList($sqlQuery);
 }
 /**
  * Get all records from table
  */
 public function getResponses($challengeId)
 {
     $sql = "SELECT response.*, user.first_name, user.last_name, user.username \r\n\t\t\t\t\tFROM challenge_responses as response JOIN user_info as user\r\n\t\t\t\t\t\tWHERE response.challenge_id = ? AND response.user_id = user.id ORDER BY response.creation_time ASC ;";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($challengeId);
     return $this->getListReponse($sqlQuery);
 }
 /**
  * Get all records from table
  */
 public function queryAllConversation($projectId)
 {
     $sql = 'SELECT * FROM project_responses WHERE project_id = ? AND status = 5';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($projectId);
     return $this->getList($sqlQuery);
 }
 public function updateStatus($id)
 {
     $sql = 'UPDATE user_access_aid SET status=1 WHERE id = ?;';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($id);
     return $this->executeUpdate($sqlQuery);
 }
 function queryInFechas($inicio, $fin, $hotelId)
 {
     $sql = "SELECT DISTINCT * FROM hotel_fechas\n                WHERE hotel_id = ? AND UNIX_TIMESTAMP(fecha) BETWEEN UNIX_TIMESTAMP('{$inicio}') \n                AND UNIX_TIMESTAMP('{$fin}')";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($hotelId);
     return $this->getList($sqlQuery);
 }
 public function deleteReminder($id)
 {
     $sql = 'UPDATE reminders SET status = 2 WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($id);
     return $this->executeUpdate($sqlQuery);
 }
 public function getUserJobPreferredJobLocations($userId)
 {
     $sql = "SELECT * FROM working_locations as locations JOIN user_locations as user_location \r\n\t\t\t\t\tWHERE locations.id = user_location.location_id \r\n\t\t\t\t\t\tAND user_location.user_id = ?";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($userId);
     return $this->getList($sqlQuery);
 }
 public function queryByDistribuidorId($value)
 {
     $sql = 'SELECT * FROM condicion WHERE usuario_id = ? OR usuario_id IS NULL order by condicion_categoria_id';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($value);
     return $this->getList($sqlQuery);
 }
예제 #14
0
 /**
  * Delete team member from table
  * @param team primary key
  */
 public function deleteTeamMember($id)
 {
     $sql = 'UPDATE teams SET member_status = 2 WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($id);
     return $this->executeUpdate($sqlQuery);
 }
 public function queryByConfiguracionIdMontoAsc($value)
 {
     $sql = 'SELECT * FROM reglas_cupones WHERE configuracion_id = ? order by monto ASC';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($value);
     return $this->getList($sqlQuery);
 }
 public function getApuntes($value)
 {
     $sql = 'SELECT * FROM apuntes WHERE id_usuario = ? and b_borrado=0';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($value);
     return $this->getList($sqlQuery);
 }
 /**
  * Update record in table
  *
  * @param CondicionCategoriaMySql condicionCategoria
  */
 public function update($condicionCategoria)
 {
     $sql = 'UPDATE condicion_categoria SET nombre = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($condicionCategoria->nombre);
     $sqlQuery->setNumber($condicionCategoria->id);
     return $this->executeUpdate($sqlQuery);
 }
예제 #18
0
 /**
  * Update record in table
  *
  * @param FaqMySql faq
  */
 public function update($faq)
 {
     $sql = 'UPDATE faq SET contenido = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($faq->contenido);
     $sqlQuery->setNumber($faq->id);
     return $this->executeUpdate($sqlQuery);
 }
 public function getUserJobPreference($userId)
 {
     $sql = "SELECT * FROM job_preference WHERE user_id = ?  ORDER BY last_update_on DESC;";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($userId);
     $jobPreference = $this->getList($sqlQuery);
     return $jobPreference;
 }
 /**
  * Update record in table
  *
  * @param TipoSondaMySql tipoSonda
  */
 public function update($tipoSonda)
 {
     $sql = 'UPDATE TipoSonda SET Descrizione = ? WHERE ID = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($tipoSonda->descrizione);
     $sqlQuery->setNumber($tipoSonda->iD);
     return $this->executeUpdate($sqlQuery);
 }
 /**
  * Update record in table
  *
  * @param ProfessionsMySql profession
  */
 public function update($profession)
 {
     $sql = 'UPDATE professions SET name = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($profession->name);
     $sqlQuery->setNumber($profession->id);
     return $this->executeUpdate($sqlQuery);
 }
예제 #22
0
 /**
  * Update record in table
  *
  * @param BlobsMySql blob
  */
 public function update($blob)
 {
     $sql = 'UPDATE blobs SET stmt = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($blob->stmt);
     $sqlQuery->setNumber($blob->id);
     return $this->executeUpdate($sqlQuery);
 }
예제 #23
0
 /**
  * Update record in table
  *
  * @param PermisoMySql permiso
  */
 public function update($permiso)
 {
     $sql = 'UPDATE permiso SET nombre = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($permiso->nombre);
     $sqlQuery->setNumber($permiso->id);
     return $this->executeUpdate($sqlQuery);
 }
예제 #24
0
 /**
  * Update record in table
  *
  * @param CategoriaMySql categoria
  */
 public function update($categoria)
 {
     $sql = 'UPDATE categoria SET nome = ? WHERE id_categoria = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($categoria->nome);
     $sqlQuery->setNumber($categoria->idCategoria);
     return $this->executeUpdate($sqlQuery);
 }
예제 #25
0
    public function getPushForm($userId)
    {
        $sql = 'SELECT form.* FROM  teamroom_push_forms.forms as form JOIN teamroom_push_forms.user_forms as user_push_form 
					WHERE user_push_form.user_id = ? AND form.id = user_push_form.form_id AND user_push_form.status = 0';
        $sqlQuery = new SqlQuery($sql);
        $sqlQuery->setNumber($userId);
        return $this->getRow($sqlQuery);
    }
 /**
  * Update record in table
  *
  * @param TelefonoTipoMySql telefonoTipo
  */
 public function update($telefonoTipo)
 {
     $sql = 'UPDATE telefono_tipo SET nombre = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($telefonoTipo->nombre);
     $sqlQuery->setNumber($telefonoTipo->id);
     return $this->executeUpdate($sqlQuery);
 }
예제 #27
0
 /**
  * Update record in table
  *
  * @param IndemniteMySql indemnite
  */
 public function update($indemnite)
 {
     $sql = 'UPDATE indemnite SET tarifkilometrique = ? WHERE Annee = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($indemnite->tarifkilometrique);
     $sqlQuery->setNumber($indemnite->annee);
     return $this->executeUpdate($sqlQuery);
 }
 /**
  * Update record in table
  *
  * @param UsuarioGrupoMySql usuarioGrupo
  */
 public function update($usuarioGrupo)
 {
     $sql = 'UPDATE usuario_grupo SET nombre = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($usuarioGrupo->nombre);
     $sqlQuery->setNumber($usuarioGrupo->id);
     return $this->executeUpdate($sqlQuery);
 }
예제 #29
0
 /**
  * Update record in table
  *
  * @param MotifMySql motif
  */
 public function update($motif)
 {
     $sql = 'UPDATE motif SET libelle = ? WHERE idMotif = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($motif->libelle);
     $sqlQuery->setNumber($motif->idMotif);
     return $this->executeUpdate($sqlQuery);
 }
 /**
  * Update record in table
  *
  * @param CarrerasMySql carrera
  */
 public function update($carrera)
 {
     $sql = 'UPDATE carreras SET nombre = ? WHERE id_carrera = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($carrera->nombre);
     $sqlQuery->setNumber($carrera->idCarrera);
     return $this->executeUpdate($sqlQuery);
 }