You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.6 KiB

계정정보

DB정보

---------------------------------------------------------------------------- 참고 쿼리 ----------------------------------------------------------------------------

일상기록 삭제

delete from tbl_bf_daily_nutrition where smc_no = 73; delete from tbl_bf_daily_nutrition_1 where smc_no = 73; delete from tbl_bf_daily_nutrition_2 where smc_no = 73; delete from tbl_bf_daily_nutrition_3 where smc_no = 73; delete from tbl_bf_daily_nutrition_4 where smc_no = 73; delete from tbl_bf_daily_nutrition_5 where smc_no = 73; delete from tbl_bf_daily_nutrition_6 where smc_no = 73; delete from tbl_bf_daily_nutrition_7 where smc_no = 73; delete from tbl_bf_daily_nutrition_8 where smc_no = 73; delete from tbl_bf_daily_nutrition_9 where smc_no = 73; delete from tbl_bf_daily_nutrition_10 where smc_no = 73;

동기화 관련

select * from tbl_bf_family where member_id = 'renamaestro'; select smc_no, member_id from tbl_bf_family_baby where member_id = 'renamaestro'; select * from tbl_bf_family_baby_disease where smc_no in(2,3); select * from tbl_bf_family_baby_order where smc_no in(2,3);

회원정보 삭제

delete from tbl_member where name = '김종환'; delete from tbl_member_confirm where member_id = '1642055604247'; delete from tbl_bf_family_disease where bf_no = '5'; delete from tbl_bf_family where member_id = '1642055604247'; delete from tbl_bf_family_baby where member_id = '1642055604247'; delete from tbl_bf_family_baby_disease where smc_no = '72';

세션 회원아이디 GET

HttpSession session = request.getSession(false); DataMap rm_mem = (DataMap) session.getAttribute(ConstantSystem.SESSION_RM_MEMBER); paramMap.put("member_id", RenaStringUtil.getData(rm_mem, "member_id"));

#메모리 - 일간분석 select DATE_FORMAT(a.reg_dt, '%H') as hour, count(*) as cnt from tbl_bf_family_match a inner join tbl_bf_daily_nutrition b on a.smc_no = b.smc_no inner join tbl_bf_family_match c on a.smc_no = c.smc_no where a.member_id = '1642861413918' and DATE_FORMAT(b.reg_dt, '%Y-%m-%d') = DATE_FORMAT(now(), '%Y-%m-%d') group by DATE_FORMAT(b.reg_dt, '%H');

#메모리 - 주간분석 select DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H') as day, count(*) as cnt from tbl_bf_family_match a inner join tbl_bf_daily_nutrition b on a.smc_no = b.smc_no inner join tbl_bf_family_match c on a.smc_no = c.smc_no where a.member_id = '1642861413918' and b.reg_dt between STR_TO_DATE('2022-02-15 00:00:00','%Y-%m-%d %H:%i:%s') and STR_TO_DATE('2022-02-15 23:59:59','%Y-%m-%d %H:%i:%s')
group by DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H') order by DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H') asc;

#메모리 - 타임라인(모유, 각 카테고리별 수치 및 시간간격 계산해야됨.) select DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H:%i:%s') as reg_date, d.title, b.dn_no, (select eat_qty from tbl_bf_daily_nutrition_1 tn1 where tn1.dn_no = b.dn_no) as eat_qty from tbl_bf_family_match a inner join tbl_bf_daily_nutrition b on a.smc_no = b.smc_no inner join tbl_bf_family_match c on a.smc_no = c.smc_no inner join tbl_code_item_str d on b.nutirition_cd_no = d.cd_no where a.member_id = '1642861413918' and DATE_FORMAT(b.reg_dt,'%Y-%m-%d') = STR_TO_DATE('2022-02-15','%Y-%m-%d') ;