public function updateLastLoginTime($userId, $timestamp)
 {
     $sql = 'UPDATE user_info SET  last_login_time = ? WHERE id = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($timestamp);
     $sqlQuery->set($userId);
     return $this->executeUpdate($sqlQuery);
 }
 /**
  * Update record in table
  *
  * @param UserSocialLinksMySql userSocialLink
  */
 public function updateSocialLink($userId, $linkUrl, $type)
 {
     $sql = 'UPDATE user_social_links SET link_url = ? WHERE user_id = ? AND type = ? ';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($linkUrl);
     $sqlQuery->setNumber($userId);
     $sqlQuery->set($type);
     return $this->executeUpdate($sqlQuery);
 }
 public function loadProjectKeywords($projectId)
 {
     $sql = 'SELECT * FROM keywords WHERE u_p_c_id = ? AND type = 2';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($projectId);
     return $this->getList($sqlQuery);
 }
 public function queryByHashKeyAidId($hashKey, $userId)
 {
     $sql = 'SELECT * FROM user_access_aid WHERE id = ? AND hash_key = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->setNumber($userId);
     $sqlQuery->set($hashKey);
     return $this->getList($sqlQuery);
 }
 public function getLastTemporadaOfSerie($idSerie)
 {
     $sql = 'SELECT MAX(temporada) temporada FROM vod WHERE id_serie = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($idSerie);
     $tab = QueryExecutor::execute($sqlQuery);
     if (count($tab) == 0) {
         return null;
     }
     return $tab[0]['temporada'];
 }
 /**
  * Get teal Dashboard records from table
  */
 public function queryAllTeamDasboard($projectId, $projectId, $projectId, $teamName, $projectId, $teamName, $projectId, $teamName)
 {
     $sql = "(SELECT challenge.id, challenge.title, challenge.type, challenge.status, challenge.creation_time, user.first_name, user.last_name, user.username \r\n\t\t\t\t\tFROM challenges as challenge JOIN user_info as user \r\n\t\t\t\t\t\tWHERE challenge.project_id = ? \r\n\t\t\t\t\t\t\tAND (challenge.type = '1' OR challenge.type = '2') \r\n\t\t\t\t\t\t\tAND challenge.status = '1' \r\n\t\t\t\t\t\t\tAND challenge.status != '3' \r\n\t\t\t\t\t\t\tAND challenge.status != '7' \r\n\t\t\t\t\t\t\tAND challenge.user_id = user.id\r\n\t\t\t\t\t)\r\n\t\t\t\t\tUNION\r\n\t\t\t\t\t(SELECT DISTINCT challenge.id, challenge.title, challenge.type, challenge.status, challenge.creation_time, user.first_name, user.last_name, user.username \r\n\t\t\t\t\t\tFROM challenges as challenge JOIN user_info as user JOIN challenge_ownership as owner \r\n\t                    WHERE challenge.project_id = ?\r\n\t                        AND challenge.id = owner.challenge_id \r\n\t                        AND owner.user_id = user.id \r\n\t                        AND challenge.status != '3' \r\n\t                        AND challenge.status != '7'\r\n\t                        AND owner.user_id \r\n\t                            IN (SELECT user_id FROM teams WHERE project_id = ? AND team_name = ? AND member_status = '1')\r\n\t                        AND challenge.id \r\n\t                        \tNOT IN (SELECT challenge_id FROM team_tasks WHERE project_id = ? AND team_name = ?)\r\n\t\t\t\t\t)\r\n\t\t\t\t\tUNION\r\n\r\n\t\t\t\t\t(SELECT a.challenge_id, challenge.title, challenge.type, challenge.status, challenge.creation_time, user.first_name, user.last_name, user.username \r\n\t\t\t\t\t\tFROM team_tasks as a join challenges as challenge JOIN user_info as user\r\n\t                    WHERE a.project_id = ? \r\n\t                        AND a.team_name = ? \r\n\t                        AND a.challenge_id = challenge.id\r\n\t\t\t\t\t\t    AND challenge.user_id = user.id\r\n\t\t\t\t\t\t    AND challenge.status != '3' \r\n\t                        AND challenge.status != '7'\r\n\t\t\t\t)";
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($projectId);
     $sqlQuery->set($projectId);
     $sqlQuery->set($projectId);
     $sqlQuery->set($teamName);
     $sqlQuery->set($projectId);
     $sqlQuery->set($teamName);
     $sqlQuery->set($projectId);
     $sqlQuery->set($teamName);
     return $this->getListAllTeamDashboard($sqlQuery);
 }
 public function queryByTerm($term, $usuarioId = 0, $tipo = "hotel")
 {
     $sql = 'SELECT DISTINCT c.* FROM campania AS c ';
     if ($usuarioId) {
         $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 ue.empresa_id = e.id ';
     }
     $sql .= ' WHERE c.estado = "Aprobada" AND (';
     $sql .= ' c.nombre like "%' . $term . '%" OR ';
     $sql .= ' c.localizador like "%' . $term . '%" )';
     $sql .= ' AND c.tipo = ?';
     if ($usuarioId) {
         $sql .= ' AND ue.usuario_id = ?';
     }
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($tipo);
     if ($usuarioId) {
         $sqlQuery->setNumber($usuarioId);
     }
     return $this->getList($sqlQuery);
 }
 public function deleteByStateExecution($value)
 {
     $sql = 'DELETE FROM alteration WHERE stateExecution = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByDescrizione($value)
 {
     $sql = 'DELETE FROM TipoSonda WHERE Descrizione = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByHeadshipITName($value)
 {
     $sql = 'DELETE FROM headshipit WHERE headshipITName = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
示例#11
0
 public function deleteBySenha($value)
 {
     $sql = 'DELETE FROM usuario WHERE senha = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByFecha($value)
 {
     $sql = 'DELETE FROM tbl_evaluacion WHERE fecha = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByTime($value)
 {
     $sql = 'DELETE FROM keywords WHERE time = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByName($value)
 {
     $sql = 'DELETE FROM professions WHERE name = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByTipoCobro($value)
 {
     $sql = 'DELETE FROM reserva WHERE tipo_cobro = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByFechaFin($value)
 {
     $sql = 'DELETE FROM tbl_puesto_historico WHERE fecha_fin = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByStatus($value)
 {
     $sql = 'DELETE FROM projects WHERE status = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
示例#18
0
 public function deleteByStmt($value)
 {
     $sql = 'DELETE FROM blobs WHERE stmt = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
示例#19
0
 public function deleteByPrintSurface($value)
 {
     $sql = 'DELETE FROM printer WHERE print_surface = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByCreationTime($value)
 {
     $sql = 'DELETE FROM reminders WHERE creation_time = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByOpDevolucion($value)
 {
     $sql = 'DELETE FROM reserva_pago WHERE op_devolucion = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByTipo($value)
 {
     $sql = 'DELETE FROM hotel_archivo WHERE tipo = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
示例#23
0
 public function deleteByContenido($value)
 {
     $sql = 'DELETE FROM faq WHERE contenido = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteBySalario($value)
 {
     $sql = 'DELETE FROM tbl_empleado WHERE salario = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByMaxSogliaEstate($value)
 {
     $sql = 'DELETE FROM Sonda WHERE MaxSogliaEstate = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
示例#26
0
 public function deleteByUf($value)
 {
     $sql = 'DELETE FROM cidades WHERE uf = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByFechaModificacion($value)
 {
     $sql = 'DELETE FROM opinion_libro WHERE fecha_modificacion = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
示例#28
0
 public function deleteByLibelle($value)
 {
     $sql = 'DELETE FROM ligue WHERE libelle = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByDatafinal($value)
 {
     $sql = 'DELETE FROM bannersuperior WHERE datafinal = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }
 public function deleteByDescripcion($value)
 {
     $sql = 'DELETE FROM destino_turistico WHERE descripcion = ?';
     $sqlQuery = new SqlQuery($sql);
     $sqlQuery->set($value);
     return $this->executeUpdate($sqlQuery);
 }