0% found this document useful (0 votes)
9 views2 pages

SQL Update

Uploaded by

Ferry Hermawan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

SQL Update

Uploaded by

Ferry Hermawan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

update info set jalurharga=220886959;

---- update 5 juli 2017 --- security update

alter table daftaridymh2h add resource varchar(100) default '';


update user set passworduser=md5(md5(concat(passworduser,namauser)));
alter table masterreseller modify pin varchar(128);
update masterreseller set pin=aes_encrypt(pin,password((select jalurharga from
info)));
update hptrx set hp=aes_encrypt(hp,password((select jalurharga from info)));
alter table pesanterimacentergt add hash varchar(128) default '';
alter table inboxsms add hash varchar(128) default '';

/*!50003 SET sql_mode = @saved_sql_mode */ ;


/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP FUNCTION IF EXISTS `ListNoHpRs` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION
`ListNoHpRs`(ParamIdReseller VARCHAR(16),paramkey varchar(32)) RETURNS varchar(512)
CHARSET latin1
BEGIN
DECLARE _Hasil VARCHAR(1024) DEFAULT "";
DECLARE _NomorHp VARCHAR(100) DEFAULT "";
DECLARE _Dipakai VARCHAR(1) DEFAULT "";

DECLARE SudahEOF INT DEFAULT 0;


DECLARE Cur CURSOR FOR SELECT aes_decrypt(hp,password(paramkey)), aktif FROM
hptrx WHERE tipe=0 and IdReseller=ParamIdReseller ORDER BY aktif DESC, hp ASC;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET SudahEOF = 1;

SET _Hasil="";
OPEN Cur;
REPEAT
FETCH Cur INTO _NomorHp, _Dipakai;
IF NOT SudahEOF THEN
IF (LENGTH(CONCAT(_Hasil,_NomorHp))<510) THEN
IF (_Dipakai="0") THEN
SET _NomorHp=CONCAT("*",_NomorHp);
END IF;
SET _Hasil=CONCAT(_Hasil,_NomorHp,CHAR(10),CHAR(13));
ELSE
SET SudahEOF=1;
END IF;
END IF;
UNTIL SudahEOF END REPEAT;
CLOSE Cur;
IF (_Hasil<>"") THEN
SET _Hasil=LEFT(_Hasil,LENGTH(_Hasil)-2);
END IF;
RETURN _Hasil;
END */;;
DELIMITER ;

You might also like