채택완료

php 자동삭제 문군데 도움좀 부탁드려요.

2020-04-05 (일) 08:41:40 1,662

​<?
$tatble​ = 'angel'<-----특정 삭제할 게시판명 넣으시세요 
function get_board_datadel($table){
 
   global $g5;
   
 
   $real_write_table = $g5['write_prefix'] . $atble; // 게시판 테이블 전체이름
 
   $sql = " TRUNCATE $real_write_table ";
      sql_query($sql);
 
  // 최신글 삭제
   sql_query(" delete from $g5[board_new_table] where bo_table = '$table' ");
 
   // 게시글수 초기화
   sql_query("update $g5[board_table] set bo_count_write = '0' where bo_table = '$table' ");
 
  // 스크랩 삭제
   sql_query(" delete from $g5[scrap_table] where bo_table = '$query' ");
 
 }
?>

g4용을 g5용으로 바꿨는데.

혹시 틀린 부분이 있을까요 ㅠㅠ

m3cron 을 이용해서 php 돌리려고 한거거든요.

게시물삭제용으로.

도움좀 부탁드릴께요

|

답변 1개

채택된 답변
+20 포인트

  $sql = " TRUNCATE $real_write_table ";-->  $sql = " TRUNCATE table $real_write_table ";

답변을 작성하려면 로그인이 필요합니다.