쿼리 좀 봐주세요

Extra Form
PHP PHP 7.0
CMS XpressEngine

아래 xml 쿼리문은 게시판의 특정회원의 게시글 수를 추출하는 쿼리인것 같습니다.

그런데 글의 갯수가 글의상태가 PUBLIC, SECRET, TEMP 상관없이 모두 뽑아오고 있어서

status(PUBLIC) 만 추출하려고 하는데 제가 XML 쿼리문은 전혀 다루질 못합니다.

조언 부탁드립니다.

 

<query id="document_count" action="select">
    <tables>
        <table name="documents" />
<table name="modules" />
    </tables>
    <columns>
        <column name="count(*)" alias="count" />
    </columns>
    <conditions>
<condition operation="equal" column="documents.module_srl" default="modules.module_srl" notnull="notnull" />
<condition operation="equal" column="modules.module" default="board" notnull="notnull" pipe="and"/>
        <condition operation="equal" column="documents.member_srl" var="member_srl" pipe="and"/>
<condition operation="equal" column="documents.ipaddress" var="ipaddress" pipe="and" />
<condition operation="more" column="documents.regdate" var="limit_start" notnull="notnull" pipe="and" />
        <condition operation="in" column="documents.module_srl" var="limit_module_srl" pipe="and" />
    </conditions>
</query>

 

  • profile

    <condition operation="equal" column="documents.status" default="public" pipe="and"/>

    이걸 추가하면 될 것 같네요.

  • profile
    감사합니다. 한번 적용시켜보겠습니다