제목 전체를 불러오기 위한 쿼리문... 정보
제목 전체를 불러오기 위한 쿼리문...본문
게시판의 원 글이 10개 입니다..
만약에 게시판의 원글 제목만 모조리 불러올려 한다면..
$row=sql_fetch("select wr_subject, count(*) as cnt from g4_write_photolist where wr_is_comment ='0'");
이렇게 쿼리하면..
$row[cnt] 하면 게시물을 카운트하고...
$row[wr_subject] 이렇게 하면 원글 게시물 제목을 모조리 쫘악 나와야 되는 거 아닌가여? 왜 1개만 나올까요?
좀 갈켜주세용~~~
만약에 게시판의 원글 제목만 모조리 불러올려 한다면..
$row=sql_fetch("select wr_subject, count(*) as cnt from g4_write_photolist where wr_is_comment ='0'");
이렇게 쿼리하면..
$row[cnt] 하면 게시물을 카운트하고...
$row[wr_subject] 이렇게 하면 원글 게시물 제목을 모조리 쫘악 나와야 되는 거 아닌가여? 왜 1개만 나올까요?
좀 갈켜주세용~~~
( select a.* , ( select sum(co_count) as co_count from g4_qa_choose where mb_id=a.mb_id and bo_table = 'g4_qa' ) as q_co_count from `g4_write_g4_qa` a where wr_parent = '283476' and wr_8 != '' and wr_is_comment = 1 and CONVERT(wr_7, UNSIGNED) >= 5 group by wr_content having max(wr_7) order by CONVERT(wr_7, UNSIGNED) desc limit 3 )
1055 : Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sir.a.wr_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
error file : /15sir/bbs/board.php