묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
SQL 구문질문드립니다
2010.09.15 00:30
<query id="getNewestDocuments" action="select">
<tables>
<table name="modules" />
<table name="documents" />
<table name="comments" />
<table name="document_categories" />
</tables>
<columns>
<column name="modules.site_srl" alias="site_srl"/>
<column name="modules.mid" alias="mid"/>
<column name="comments.content" alias="commnet"/>
<column name="max(comments.comment_srl)" alias="last_cnt"/>
<column name="document_categories.title" alias="categorie"/>
<column name="documents.*" />
</columns>
<conditions>
<condition operation="equal" column="modules.site_srl" var="site_srl" />
<condition operation="not_in" column="documents.module_srl" default="0" pipe="and" />
<condition operation="in" column="documents.module_srl" var="module_srl" filter="number" pipe="and" />
<condition operation="equal" column="comments.document_srl" default="documents.document_srl" pipe="and" />
<condition operation="equal" column="document_categories.category_srl" default="documents.category_srl" pipe="and" />
<condition operation="equal" column="comments.parent_srl" default="0" pipe="and" />
<condition operation="equal" column="modules.module_srl" default="documents.module_srl" filter="number" pipe="and" />
</conditions>
<groups>
<group column="comments.document_srl" />
</groups>
<navigation>
<index var="sort_index" default="documents.list_order" order="order_type" />
<list_count var="list_count" default="20" />
</navigation>
</query> --------------------------------------------------------------------------------------- 현재 저한테 맞는 위젯을 만들기 위해 최근문서위젯을 수정하고 있습니다 컨셉은 최신 댓글(댓글의 댓글은 제외)과 댓글이 달린 게시물을 가져 오는것인데 SQL을 위의 처럼 작성 했지만 계속 첫번째 댓글을 가져 옵니다 어떻게 수정 해야 할까요 도움 부탁드립니다
<tables>
<table name="modules" />
<table name="documents" />
<table name="comments" />
<table name="document_categories" />
</tables>
<columns>
<column name="modules.site_srl" alias="site_srl"/>
<column name="modules.mid" alias="mid"/>
<column name="comments.content" alias="commnet"/>
<column name="max(comments.comment_srl)" alias="last_cnt"/>
<column name="document_categories.title" alias="categorie"/>
<column name="documents.*" />
</columns>
<conditions>
<condition operation="equal" column="modules.site_srl" var="site_srl" />
<condition operation="not_in" column="documents.module_srl" default="0" pipe="and" />
<condition operation="in" column="documents.module_srl" var="module_srl" filter="number" pipe="and" />
<condition operation="equal" column="comments.document_srl" default="documents.document_srl" pipe="and" />
<condition operation="equal" column="document_categories.category_srl" default="documents.category_srl" pipe="and" />
<condition operation="equal" column="comments.parent_srl" default="0" pipe="and" />
<condition operation="equal" column="modules.module_srl" default="documents.module_srl" filter="number" pipe="and" />
</conditions>
<groups>
<group column="comments.document_srl" />
</groups>
<navigation>
<index var="sort_index" default="documents.list_order" order="order_type" />
<list_count var="list_count" default="20" />
</navigation>
</query> --------------------------------------------------------------------------------------- 현재 저한테 맞는 위젯을 만들기 위해 최근문서위젯을 수정하고 있습니다 컨셉은 최신 댓글(댓글의 댓글은 제외)과 댓글이 달린 게시물을 가져 오는것인데 SQL을 위의 처럼 작성 했지만 계속 첫번째 댓글을 가져 옵니다 어떻게 수정 해야 할까요 도움 부탁드립니다
댓글 1
-
라르게덴
2010.09.15 03:40
-
레이머스
2010.09.15 06:54
알려 주신대로 해 봤지만 안되내요 제가 알고 있는 방식이 틀린가 봅니다. 고민좀 해야 겠네요 -
레이머스
2010.09.15 06:55
답변 감사드립니다
글쓴이 | 제목 | 최종 글 |
---|---|---|
XE | 공지 글 쓰기,삭제 운영방식 변경 공지 [16] | 2019.03.05 by 남기남 |
김경훈229 | 댓글에 댓글을 달면 게시물이 사라지는 현상 발생 | |
엉엉ㅠ | 갤러리 게시판이 뜨질 않습니다. [19] | 2009.01.29 by Rally |
박토치 | 페이지에 대한 질문입니다.꼭좀 답변해주세요. [1] | 2009.01.29 by 백성찬 |
성훈 | 글들이 항상 가운데 정열입니다. [1] | 2009.01.29 by 우유가짱 |
막대사탕980 | 외부로그인 삽입 [1] | 2009.01.29 by 우유가짱 |
xfilechun | 페이징 속도 문제 --조언주세요 | |
토마토버터 | 갤러리 이미지가 사라지네요 ㅠㅠ. | |
parangjin | 파일 업로드에 대해서 [4] | 2009.01.29 by SMaker |
뮤랑이 | 특정 게시판에서 댓글을 달면 자동으로 추천이 되게 하고 싶습니다. [4] | 2009.01.29 by 뮤랑이 |
나긋나긋한씨 | 제로보드 오류 발견입니다. | |
pyjune.myid.net | 메뉴의 권한 관련...오류인가요? [2] | 2009.01.29 by 박영준 |
늘미소 | php 변수의 값에 ''&''가 포함되었을때 어떻게 전달하는가요? | |
이한백 | 에디터 높이 조절.. [2] | 2009.01.29 by 김찬 |
칼릴지브란 | 1.15 업데이트 이후 썬지오 ucc 동영상이 안나옵니다. [1] | 2009.01.29 by 닥터귀염 |
아드레날린 | 저작권? [2] | 2009.01.29 by Habile |
현영민 | 기본게시판삭제.. [6] | 2009.01.29 by 현영민 |
한승연♡ | 질문좀 하겠습니다(초짜에여) [4] | 2009.01.29 by 만쓰별(정만) |
한승연♡ | 제로보드 처음쓰는 초짜가 질문합니다. [3] | 2009.01.29 by Habile |
whitemind | 메인페이지에 사진을 넣구 싶습니다 ^^ [3] | 2009.01.29 by 만쓰별(정만) |
VICSTONE | 1.1.4 ==> 1.1.5 업그레이드해도 1.1.4 로 나와요 [2] | 2009.01.29 by VICSTONE |
<navigation>
<index var="sort_index" default="comments.list_order" order="order_type" />
<list_count var="list_count" default="20" />
</navigation>
comments로 바꿔주면 되지 않을까요?