connect.lib.php 질문입니다. 채택완료
lacomparte
8년 전
조회 2,704
</p><p style="font-size: 14.6667px;">$sql = " select sum(IF(mb_id<>'',1,0)) as mb_cnt, count(*) as total_cnt from {$g5['login_table']} where mb_id <> '{$config['cf_admin']}' "; </p><p style="font-size: 14.6667px;">
위의 쿼리에서
mb_id 중복제거를 하고 싶은데(pc, mobile 같은 아이디로 로그인하면 카운트도 증가되서요)
</p><p style="font-size: 14.6667px;">$sql = " select DISTINCT sum(IF(mb_id<>'',1,0)) as mb_cnt, count(*) as total_cnt from {$g5['login_table']} where mb_id <> '{$config['cf_admin']}' "; </p><p style="font-size: 14.6667px;">
이렇게 해도 안되더군요ㅠ 힌트좀 주실수 있을까요?ㅠㅜ
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인