답변 3개
채택된 답변
+20 포인트
3년 전
select count(*) cnt from ( select wr_id from g5_write_book group by wr_num having count()=1 A)
로그인 후 평가할 수 있습니다
답변에 대한 댓글 3개
3년 전
오타가 좀 있었네요.
select count(*) cnt from ( select wr_id from g5_write_book group by wr_num having count(*)=2 )A;
아니면
select count(*) cnt from ( select wr_id from g5_write_book group by wr_parent having count(*)=2 )A;
select count(*) cnt from ( select wr_id from g5_write_book group by wr_num having count(*)=2 )A;
아니면
select count(*) cnt from ( select wr_id from g5_write_book group by wr_parent having count(*)=2 )A;
댓글을 작성하려면 로그인이 필요합니다.
3년 전
$row=sql_fetch("select count(*) as cnt from g5_write_book where wr_is_comment =0 and wr_comment=1");
echo $row['cnt'];
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
3년 전
Copy
SELECT count(*) cnt FROM g5_write_book
WHERE wr_id in (SELECT wr_parent FROM g5_write_book b
WHERE wr_is_comment = 1
GROUP BY wr_parent
HAVING COUNT(*) =1)
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인