open(); //------------------------- // 쿼리문 실행 //------------------------- // 만화 내용 가져오기 $sql = PHP_EOL." SELECT I.*, C.num, C.filename "; $sql .= PHP_EOL." FROM cartoon_info I, cartoon_content C "; $sql .= PHP_EOL." WHERE I.cartoon_id = '$cartoon_id' "; $sql .= PHP_EOL." AND I.cartoon_id = C.cartoon_id "; if (!empty($num)) { $sql .= PHP_EOL." AND C.num = '$num' "; } else { $sql .= PHP_EOL." AND C.num = (SELECT MAX(num) FROM cartoon_content WHERE cartoon_id = '$cartoon_id' ) "; } $cartoon = $dbCon->get($sql); // 만화 내용 총 갯수 가져오기 $sql = PHP_EOL." SELECT COUNT(*) cnt "; $sql .= PHP_EOL." FROM cartoon_content "; $sql .= PHP_EOL." WHERE cartoon_id = '$cartoon_id' "; $query_result = $dbCon->get($sql); $last_num = $query_result['cnt'] -1; // 2015-12-30 Shin 추가 if ($cartoon_id == "kangho"){ $last_num = $last_num +509; } if ($cartoon_id == "pgi"){ $last_num = $last_num +281; } // 좌측 만화 리스트 가져오기 $sql = PHP_EOL." SELECT I.*, (SELECT SUBSTRING(filename,1,8) FROM cartoon_content WHERE cartoon_id = I.cartoon_id ORDER BY num DESC LIMIT 1) filename "; $sql .= PHP_EOL." FROM cartoon_info I "; $sql .= PHP_EOL." WHERE I.use_yn = 'Y' "; $sql .= PHP_EOL." AND I.series_type = 'series' "; $sql .= PHP_EOL." ORDER BY I.end_yn ASC, I.cartoon_id ASC "; $series_list = $dbCon->query($sql); $sql = PHP_EOL." SELECT I.*, (SELECT SUBSTRING(filename,1,8) FROM cartoon_content WHERE cartoon_id = I.cartoon_id ORDER BY num DESC LIMIT 1) filename "; $sql .= PHP_EOL." FROM cartoon_info I "; $sql .= PHP_EOL." WHERE I.use_yn = 'Y' "; $sql .= PHP_EOL." AND I.series_type = 'novel' "; $sql .= PHP_EOL." ORDER BY I.end_yn ASC, I.cartoon_id ASC "; $novel_list = $dbCon->query($sql); $day = date('d',time()); $yyyymmdd = date('Ym',time()); if ('01' <= $day && $day < '15') { $dd = '01'; } else { $dd = '15'; } $yyyymmdd .= $dd; // <<<<<< 2013-04-30에 2013-05-01 데이터를 가져오기위해 임시로 추가 if ($yyyymmdd == '20130614') { $dd = '01'; $yyyymmdd = '20130701'; } // 2013-04-30에 2013-05-01 데이터를 가져오기위해 임시로 추가 끝 >>>>>>>> if ($dd == '01') { $yyyymmdd2 = substr($yyyymmdd, 0,4).'-'.substr($yyyymmdd, 4,2).'-'.substr($yyyymmdd, 6,2); $yyyymmdd2 = date('Ym',strtotime($yyyymmdd2." -1 month")).'15'; } $sql_where = isset($yyyymmdd2) ? "'$yyyymmdd', '$yyyymmdd2'" : "'$yyyymmdd'"; $sql = PHP_EOL." SELECT O.*"; $sql .= PHP_EOL." FROM cartoon_old O "; $sql .= PHP_EOL." WHERE O.yyyymmdd IN ($sql_where) "; $sql .= PHP_EOL." ORDER BY O.yyyymmdd DESC, O.cartoon_id ASC "; $finish_list = $dbCon->query($sql); if (empty($cartoon_list)) { $sql = PHP_EOL." SELECT O.*"; $sql .= PHP_EOL." FROM cartoon_old O "; $sql .= PHP_EOL." WHERE O.yyyymmdd = (SELECT MAX(yyyymmdd) FROM cartoon_old ) "; $sql .= PHP_EOL." ORDER BY O.yyyymmdd DESC, O.cartoon_id ASC "; $finish_list = $dbCon->query($sql); } // DB와 연결 종료 $dbCon->close(); // print_r($result_list); // 등록일 $reg_dt = substr($cartoon['filename'], 0,4).'.'.substr($cartoon['filename'], 4,2).'.'.substr($cartoon['filename'], 6,2); ?> 스포츠조선 만화

연재만화 ▼

완결작품 ▼

소설연재 ▼

  • = date("Ymd",time())) { ?>
  • - 작가:
    - 업데이트일 :

    첫회보기

    1) { ?>
  • 이전
  • 목록
  • 다음

등록일

    1) { ?>
  • 이전
  • 목록
  • 다음

등록일