mysql 사용자 추가 쿼리
insert into user (Host,User,Password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Reload_priv,Shutdown_priv,Process_priv,File_priv,Grant_priv,References_priv,Index_priv,Alter_priv,Show_db_priv,Super_priv,Create_tmp_table_priv,Lock_tables_priv,Execute_priv,Repl_slave_priv,Repl_client_priv) values ('localhost','sqlplus',Password('asdf'),'Y','Y','Y','Y','Y','Y','Y','Y','Y',..
더보기
mysql query 를 이용해 달력 만들기
SELECT SUM(if(A.A2 = '6', A.A3, null)) as 일요일, SUM(if(A.A2 = '0', A.A3, null)) as 월요일, SUM(if(A.A2 = '1', A.A3, null)) as 화요일, SUM(if(A.A2 = '2', A.A3, null)) as 수요일, SUM(if(A.A2 = '3', A.A3, null)) as 목요일, SUM(if(A.A2 = '4', A.A3, null)) as 금요일, SUM(if(A.A2 = '5', A.A3, null)) as 토요일 FROM ( SELECT WEEK(DATE_FORMAT(CONCAT('200608','01'),'%Y%m%d')) - WEEK(DATE_FORMAT(concat('2006-08-' ,Id), '%Y-%..
더보기