[g5] 최근게시물 다시 생성하기 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[g5] 최근게시물 다시 생성하기

페이지 정보

profile_image
작성자 제로
댓글 0건 조회 57,620회 작성일 20-02-10 01:26

본문

<?php
include_once('./_common.php');

// 자료가 많을 경우 대비 설정변경
@ini_set('memory_limit', '-1');

if ($is_admin != "super")
  alert("최고관리자만 접근 가능합니다.", G5_URL);

// 기존 new 최근게시글 삭제
sql_query(" delete from {$g5['board_new_table']} ");
// 최근글 삭제일 체크
$sql_where = "";
if(isset($config['cf_new_del']) && $config['cf_new_del'] > 0) {
  $recover_date = date('Y-m-d H:i:s', (G5_SERVER_TIME - $config['cf_new_del'] * 86400));
  $sql_where = " where wr_datetime >= '{$recover_date}' ";
}

// new 최근게시글 등록 
$result1 = sql_query(" select * from {$g5['board_table']} ");

while($row1 = sql_fetch_array($result1))
{

  $tmp_write_table = $g5['write_prefix'] . $row1['bo_table'];
  $sql2 = " select * from $tmp_write_table $sql_where ";
  $result2 = sql_query($sql2);

  while($row2 = sql_fetch_array($result2))
  {
      echo $row1['bo_table']." 게시판 ".$row2['wr_id']." 번 등록중... 잠시 기다려주세요"."<br>";
      sql_query("insert into {$g5['board_new_table']} (bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$row1['bo_table']}', '{$row2['wr_id']}', '{$row2['wr_parent']}', '{$row2['wr_datetime']}', '{$row2['mb_id']}' )");
  }
}

echo "완료";
?>
 

댓글목록

등록된 댓글이 없습니다.

Total 829건 1 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 날짜
829 제로 3958 06-18
828 제로 6712 03-21
827 제로 6078 02-23
826 제로 32099 11-02
825 제로 35214 07-10
824 제로 47634 04-06
823 제로 32838 02-21
822 제로 39575 12-31
821 제로 31960 12-24
820 제로 31850 12-04
819 제로 34571 10-17
818 제로 33441 10-02
817 제로 62332 08-04
816 제로 31815 08-04
815 제로 44346 08-03
814 제로 44549 07-08
813 제로 76417 07-08
812 제로 93099 07-06
811 제로 33022 06-09
810 제로 39104 06-03
809 제로 37471 04-16
808 제로 37922 03-29
807 제로 32029 03-26
806 제로 39665 03-12
805 제로 34352 03-10

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5470-4714
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
2,139
어제
16,995
최대
431,155
전체
10,526,787
Copyright (c) 株式会社YHPLUS. All rights reserved.