묻고답하기
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 남기남 |
DRUNKEN | 이 댓글을... 부분 없애고 싶어요~ [4] | 2010.09.14 by LutZ |
x2lovers | 최신글 위젯을 모바일 페이지에서 불러오면 크기가..;; | |
맘보氏 | 로그인과 회원가입 심각한 오류~! | |
대학생사람연대 | xe_official_v2 서브메뉴 제목 출력 안되게.. [2] | 2010.09.14 by 대학생사람연대 |
betaon | 회원 기능을 없애고 싶습니다. [1] | 2010.09.14 by LutZ |
Huckleberry Finn | 이건 무슨 레이아웃이죠? [1] | 2010.09.15 by 오르막 |
레이머스 | SQL 구문질문드립니다 [1] | 2010.09.15 by 라르게덴 |
사랑나무1 | 헤더 부분 메뉴 추가 문의드립니다. [2] | 2010.09.15 by 사랑나무1 |
x2lovers | RSS 링크는 모바일에서는 안읽혀지네요;; | |
이라영 | 게시판 공지글 권한 설정부분 문의 드립니다. | |
불곰ㅁ | 다른 컴퓨터에서 페이지 수정 시 변경이 안되요! [1] | 2010.09.15 by 老姜君 |
911 | 클릭될때마다 조회수 올라가는 방법부탁합니다(1.4.3버전) [1] | 2010.09.15 by 박성표 |
하영사 | 게시판 첨부화일 용량 추가의 문제입니다. [2] | 2010.09.15 by 앙띠2 |
린아마법사 | 일반문서에 레벨제한을 두는 방법 [1] | 2010.09.15 by 老姜君 |
와이즈엑스맨 | 게시판 글 내부에 링크연결시 새창열기할때 주소창옵션안되는 문제 [2] | 2010.09.15 by 老姜君 |
mayanking | 캐시파일 재생성 [1] | 2010.09.15 by LutZ |
syungteu | 답변해주세요! [2] | 2010.09.15 by 구가 |
syungteu | /xe 는 어떻게 없애나요? [4] | 2010.09.15 by 구가 |
싸커맨 | 제로xe 업그레이드 [2] | 2010.09.15 by 구가 |
디제이쿠 | getDocumentList.xml, count(*) 쿼리 문제가 심각합니다. [1] | 2010.09.15 by 라르게덴 |
<navigation>
<index var="sort_index" default="comments.list_order" order="order_type" />
<list_count var="list_count" default="20" />
</navigation>
comments로 바꿔주면 되지 않을까요?