자동댓글 코드 사용 중입니다.
본문
<?php
$array = array('많이 더운날씨네요 건강 챙기세요', '안녕하세요 좋은날씨 입니다.', '방가워요', '좋은 하루 되세요', '오늘 하루도 마무리 잘하세요');
$randNum = rand(0,count($array)-1);
if ($w =='') {
$wr_write = get_write($write_table, $wr_id);//원글정보
$wr_write_content = $array[$randNum]; //댓글내용
$wr_write_password = sql_password($g5[server_time]);//패스워드
$wr_write_cname = "방문자";//댓글 등록자명
$wr_write_mbid = "admin";//댓글 아이디 사용자
$sql = " insert into $write_table
set ca_name = '$wr_write[ca_name]',
wr_num = '$wr_write[wr_num]',
wr_parent = '$wr_id',
wr_is_comment = '1',
wr_comment = '1',
wr_content = '$wr_write_content',
mb_id = '$wr_write_mbid',
wr_password = '$wr_write_password',
wr_name = '$wr_write_cname',
wr_datetime = '".G5_TIME_YMDHIS."',
wr_ip = '000.000.000.000' ";
sql_query($sql);
// 원글에 코멘트수 증가
sql_query(" update $write_table set wr_comment = wr_comment + 1 where wr_id = '$wr_id' ");
// 코멘트 1 증가
sql_query(" update $g5[board_table] set bo_count_comment = bo_count_comment + 1 where bo_table = '$bo_table' ");
}
?>
갯 수를 늘릴려면 어떻게 하면 좋을까요 ㅠㅠㅠ
!-->
답변을 작성하시기 전에 로그인 해주세요.