묻고답하기

member_news라는 테이블에 데이터를 넣는 쿼리에요. news_srl이 primary key인데.. 뭐 따로 어떻게 해야하는지를 모르겠네요;

<query id="inserNews" action="insert">
    <tables>
        <table name="member_news" />
    </tables>
    <columns>
        <column name="news_srl" var="news_srl" notnull="notnull" />
        <column name="member_srl" var="member_srl" notnull="notnull" />
        <column name="type" var="type" default="0" />    
        <column name="isFiles" var="isFiles" default="0" />       
        <column name="content_srl" var="content_srl" notnull="notnull" />
        <column name="message" var="message" notnull="notnull" /> 
        <column name="url" var="url" notnull="notnull" />
    </columns>
</query>

 

리스트를 불러오는거에요. 리스트는 최대 10개까지 페이지는 최대 5개까지 불러오는거에요. member_srl이 같은건 다 불러오는거임.

<query id="getNewsList" action="select">
    <tables>
        <table name="member_news" />
    </tables>
    <columns>
        <column name="*" />
    </columns>
    <conditions>
        <condition operation="equal" column="member_srl" var="member_srl" filter="number" notnull="notnull" />
    </conditions>
    <navigation>
        <index var="sort_index" default="list_order" order="order_type" />
        <list_count var="list_count" default="10" />
        <page_count var="page_count" default="5" />
        <page var="page" default="1" />
    </navigation>
</query>






만약 isFiles가 true일 경우에 이전에 같은게 있으면 겹쳐지는 형식으로 할려고하거든요; 그래서 이 쿼리를 사용하면 대상이 있다 없다만 알아오면 되는거에요;

member_srl, type(숫자형식), content_srl(mocument_srl로 쓰일가능성이 많음) 이 세가지가 같으면서 isFiles가 1인게 있으면 있다 없다만 알려주면되는거임.

<query id="isNews" action="select">
    <tables>
        <table name="member_news" />
    </tables>
    <columns>
        <column name="news_srl" />
    </columns>
    <conditions>
        <condition operation="equal" column="member_srl" var="member_srl" filter="number" notnull="notnull" />
        <condition operation="equal" column="type" var="type" filter="number" notnull="notnull" pipe="and"/>
        <condition operation="equal" column="isFiles" var="isFiles" filter="number" notnull="notnull" pipe="and"/>
        <condition operation="equal" column="content_srl" var="content_srl" filter="number" notnull="notnull" pipe="and"/>
    </conditions>
    <navigation>
        <index var="sort_index" default="list_order" order="order_type" />
        <list_count var="list_count" default="1" />
    </navigation>
</query>

 

 







이거 제대로 작동할까요..?

지금모듈 만들기전에 구조생각할려고 쿼리부터 만들었는데... ㅠㅠ 이게 맞는 순서인지는 모르겠네요 ㅠ

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
너는 누구냐 회원정보에서 [가입폼 관리] [입력 항목]을 불러 오는 방법이 뭐죠?  
조형래128 급합니다 도와주세요. 로그인이 안되요 [1] 2009.03.20 by 만쓰별(정만)
젤보두 이걸...머라고해야하죠 .. - -;; [1] file 2009.03.20 by 만쓰별(정만)
zerozerozero 최고관리자 질문입니다. [1] 2009.03.20 by 만쓰별(정만)
이정혁 정말 어마어마한 질문 [1] 2009.03.20 by 만쓰별(정만)
홍길동 게시판에서 <body> 태그 위치(절대경로) 아시는분? [2] 2009.03.20 by 만쓰별(정만)
난자상학 드림위버에서 이상한 에러가..고수님들 한번만 봐주세요~ -_ㅜ... [1] file 2009.03.21 by 만쓰별(정만)
연습생 주소문제입니다... [2] 2009.03.21 by 만쓰별(정만)
우정훈762 xe 새로 설치하고나서 이전 데이터 복구하려면 이렇게 하면 되나요? [1] file 2009.03.21 by 백성찬
텍사수 사진 첨부파일 업로드에 관련된 퍼미션 문제 [7] 2009.03.21 by 박토치
yujin. ftp.config.php [3] 2009.03.21 by 백성찬
야쿠소쿠 게시판 분류에서 4개 작성했더니 아무것도 나오지 않습니다. [5] file 2009.03.21 by 백성찬
퐁퐁디자인 제로보드홈페이지에서 글작성후 그림찾기 스킨? [2] 2009.03.21 by 만쓰별(정만)
nsmc 로그인박스 아래에 이미지가 나타나도록 수정 했는데... 로그인창 내부부터 배경처럼 나타나요 [5] 2009.03.21 by 만쓰별(정만)
엔시아- 설치 중에 에러가 발생합니다 [1] file 2009.03.21 by 백성찬
xe9h0st common/js/plugin 에 넣어준 js plugin 어떻게 부르나요?  
삼토리 좌측 매뉴부분 질문드립니다. [12] 2009.03.21 by 만쓰별(정만)
만쓰별(정만) 메일이 왔는데 이상한 메일이와서... 질문드려요... [1] file 2009.03.21 by 사피니아
이전 서버 이전 관련 문의 드립니다.. [1] 2009.03.21 by 백성찬
다솜낭자 FTP로 계정에 올리고 install 하려는데...페이지 윗부분에 에러 메세지가 뜹니다. [1] file 2009.03.21 by 백성찬