예를 들어 자유게시판에서 130번째로 등록된 게시글을 불러올 수 있을까요?

 

해당 함수는 없는 것 같아서 $oDB로 직접 쿼리 날렸는데 이상하게 전혀 넘어가질 않네요...

 

 

        $no = 130;

        $oDB=&DB::getInstance();

        $query=$oDB->_query('select * from rx_content where module_srl = 142 order by list_order asc limit '.$no.',1');
        $result=$oDB->_fetch($query);

 

  • profile

    테이블명이 잘못된 것 같아요. 문서는 documents, 댓글은 comments입니다.

  • profile profile
    아아 이렇게 멍청할 수가...ㅠ.ㅠ

    감사합니다... 왜 xe_content로 생각했을까요...
  • profile profile
    프론트엔드 작업을 하다 보면 <div class="xe_content"> 이걸 많이 보게 되죠 ㅋㅋ
  • profile profile
    큭... 아무튼 정말 감사합니다.. 흐.. .역시 코딩은 어렵네요..
  • profile ?

    요상한게 문서는 documents고 파일은 files 인데, 회원은 member 이네요. 회원 그룹 목록도 member_group입니다.

     

    s가 실종된 게 은근히 많이 있더군요 -_-

     

    정말 별 거 아닌데... 가끔가다가 정확한 테이블 명이 기억 안나서 일일이 찾아봐야되네요.

  • ? profile
    맞아요 ㅠㅠ

    현재 DB를 못봐서... phpmyadmin이 실종되어서리...큭
  • profile profile
    기진곰님 혹시 xe 도큐먼트 모듈 모델을 가지고 저런 방식으로 호출할 수는 없겠죠..?!
  • profile profile
    $args = new stdClass;
    $args->module_srl = 142;
    $args->sort_index = 'list_order';
    $args->order_type = 'asc';
    $args->list_count = 1;
    $args->page = 130;
    $output = executeQuery('document.getDocumentList', $args);

    테스트해 보지는 않았지만 대략 이런 식으로 하면 되지 않을까요? 특정 모듈의 문서 목록을 불러오면서 한 페이지에 1개씩, 130번째 페이지를 불러오라고 요청하는 거죠.
  • profile profile
    아아 전체수를 현재 페이수로 나눈 후 페이지를 구해서 추출하면 대략적으로 가능하긴 하겠네요..ㅎㅎ

    감사합니다.