묻고답하기
조인 OR 서브쿼리 도움좀 부탁드려요~~
2019.01.22 02:07
관리자 댓글 리스트에서 댓글 내용대신에 DOCUMENT에 TITLE 컬럼을 넣으려고 합니다.
getTotalCommentList.xml에서 불러오는것까지는 확인햇는데 조인걸면 에러가 나더라구요
도움좀 부탁드립니다.
<query id="getTotalCommentList" action="select">
<tables>
<table name="comments" alias="comments" />
<table name="documents" alias="documents" type="left join">
<conditions>
<condition operation="equal" column="comments.document_srl " default="documents.document_srl" />
</conditions>
</table>
</tables>
<columns>
<column name="comments.*" />
</columns>
<conditions>
<condition operation="in" column="comments.module_srl" var="s_module_srl" />
<condition operation="notin" column="comments.module_srl" var="exclude_module_srl" pipe="and" />
<condition operation="equal" column="comments.is_secret" var="s_is_secret" pipe="and" />
<condition operation="equal" column="comments.status" var="s_is_published" pipe="and" />
<group pipe="and">
<condition operation="like" column="comments.content" var="s_content" pipe="or" />
<condition operation="like" column="comments.user_name" var="s_user_name" pipe="or" />
<condition operation="like" column="comments.nick_name" var="s_nick_name" pipe="or" />
<condition operation="like" column="comments.email_address" var="s_email_address" pipe="or" />
<condition operation="like" column="comments.homepage" var="s_homepage" pipe="or" />
<condition operation="equal" column="comments.member_srl" var="s_member_srl" pipe="or" />
<condition operation="like_prefix" column="comments.regdate" var="s_regdate" pipe="or" />
<condition operation="like_prefix" column="comments.last_update" var="s_last_upate" pipe="or" />
<condition operation="like_prefix" column="comments.ipaddress" var="s_ipaddress" pipe="or" />
</group>
</conditions>
<navigation>
<index var="sort_index" default="list_order" order="asc" />
<list_count var="list_count" default="20" />
<page_count var="page_count" default="10" />
<page var="page" default="1" />
</navigation>
</query>