답변 1개 / 댓글 6개
채택된 답변
+20 포인트
작성한 글의 링크를 쪽지로 보내준다는 말 같은데요.
$me_id = $tmp_row[max_me_id] + 1;
if($w == ""){
$link = G5_BBS_URL."/".$bo_table."?wr_id="$wr_id;
$sql = " insert into so_memo
set me_id = '$me_id',
me_recv_mb_id = '보낼사람 아이디',
me_send_mb_id = '$member[mb_id]',
me_send_datetime ='$g5[time_ymdhis]',
me_read_datetime ='',
me_memo = '$board[bo_subject] 게시판에 새 글이 작성되었습니다.
작성자 : $member[mb_nick]
분류 : $sca
제목 : $wr_subject
작성글 보기 : $link'";
sql_query($sql);
이렇게 한다는 말 같아요.
답변에 대한 댓글 6개
write_update.skin.php를 아래로 하니 write.update.php 에러나오는데 혹시 왜그럴까요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once('./_common.php');
// 자신만의 코드를 넣어주세요.
$me_id = $tmp_row[max_me_id] + 1;
if($w == ""){
$link = G5_BBS_URL."/".$bo_table."?wr_id="$wr_id;
$sql = " insert into g5_memo
set me_id = '$me_id',
me_recv_mb_id = 'admin',
me_send_mb_id = '$member[mb_id]',
me_send_datetime ='$g5[time_ymdhis]',
me_read_datetime ='',
me_memo = '$board[bo_subject] 게시판에 새 글이 작성되었습니다.
작성자 : $member[mb_nick]
분류 : $sca
제목 : $wr_subject
작성글 보기 : $link'";
sql_query($sql);
}
?>
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once('./_common.php');
// 자신만의 코드를 넣어주세요.
$me_id = $tmp_row[max_me_id] + 1;
if($w == ""){
$link = G5_BBS_URL."/".$bo_table."?wr_id="$wr_id;
$sql = " insert into g5_memo
set me_id = '$me_id',
me_recv_mb_id = 'admin',
me_send_mb_id = '$member[mb_id]',
me_send_datetime ='$g5[time_ymdhis]',
me_read_datetime ='',
me_memo = '$board[bo_subject] 게시판에 새 글이 작성되었습니다.
작성자 : $member[mb_nick]
분류 : $sca
제목 : $wr_subject
작성글 보기 : $link'";
sql_query($sql);
}
?>
$me_id = $tmp_row[max_me_id] + 1;
여기에서 $tmp_row[max_me_id] 이게 없자나요.
이건 이전 마지막 쪽지 번호인데 그걸 가져오는 코드가 필요해요.
/bbs/memo_form_update.php 파일안에
$tmp_row = sql_fetch(" select max(me_id) as max_me_id from {$g5['memo_table']} ");
$me_id = $tmp_row['max_me_id'] + 1;
이 소스인데
$me_id = $tmp_row[max_me_id] + 1;
이걸
$tmp_row = sql_fetch(" select max(me_id) as max_me_id from {$g5['memo_table']} ");
$me_id = $tmp_row['max_me_id'] + 1;
이렇게 수정해보세요.
여기에서 $tmp_row[max_me_id] 이게 없자나요.
이건 이전 마지막 쪽지 번호인데 그걸 가져오는 코드가 필요해요.
/bbs/memo_form_update.php 파일안에
$tmp_row = sql_fetch(" select max(me_id) as max_me_id from {$g5['memo_table']} ");
$me_id = $tmp_row['max_me_id'] + 1;
이 소스인데
$me_id = $tmp_row[max_me_id] + 1;
이걸
$tmp_row = sql_fetch(" select max(me_id) as max_me_id from {$g5['memo_table']} ");
$me_id = $tmp_row['max_me_id'] + 1;
이렇게 수정해보세요.
알려주신대로 이렇게 했는데 역시 애러나네요..거의 다 된거 같은데 애러가..유유
// 자신만의 코드를 넣어주세요.
$tmp_row = sql_fetch(" select max(me_id) as max_me_id from {$g5['memo_table']} ");
$me_id = $tmp_row['max_me_id'] + 1;
if($w == ""){
$link = G5_BBS_URL."/".$bo_table."?wr_id="$wr_id;
이하생략
// 자신만의 코드를 넣어주세요.
$tmp_row = sql_fetch(" select max(me_id) as max_me_id from {$g5['memo_table']} ");
$me_id = $tmp_row['max_me_id'] + 1;
if($w == ""){
$link = G5_BBS_URL."/".$bo_table."?wr_id="$wr_id;
이하생략
답변을 작성하려면 로그인이 필요합니다.