구매고객
판매자
솔루션별 질문
2022-05-13 12:10:57 날짜 데이터 형식에 12일 1달 3달 6달 더하려면 어떻게 해야할까요??
G5_TIME_YMDHIS 이값에 12일 더한 값 1달 3달 6달 더해야하거든요 어떻게 하면 좋을까요??
https://extbrain.tistory.com/29
참고하세요.
답변을 작성하려면 로그인이 필요합니다.
광고가 아닌 글을 신고하면 회원님의 신고 권한이 제한될 수 있습니다. 신중하게 신고해 주세요.
if((int)$_POST[point]=="9800"){
$timestamp = strtotime("+12 days");
$timestamp2=date("Y-m-d H:i:s", $timestamp);
$enddate=$_POST[enddate]+$timestamp2;
}else if((int)$_POST[point]=="19800"){
$timestamp = strtotime("+1 months");
$timestamp2=date("Y-m-d H:i:s", $timestamp);
$enddate=$_POST[enddate]+$timestamp2;
}else if((int)$_POST[point]=="45800"){
$timestamp = strtotime("+3 months");
$timestamp2=date("Y-m-d H:i:s", $timestamp);
$enddate=$_POST[enddate]+$timestamp2;
}else if((int)$_POST[point]=="79800"){
$timestamp = strtotime("+6 months");
$timestamp2=date("Y-m-d H:i:s", $timestamp);
$enddate=$_POST[enddate]+$timestamp2;
}else{
}
if($_POST[point] <= $member[mb_point]){
echo $sql = " update $g5[member_table] set mb_point='$sumpoint', mb_7='$_POST[startdate]', mb_8='$enddate' where mb_id='$member[mb_id]'";
//exit;
$row = sql_query($sql);
mysql_error();
//die( "mysql connect error : " . mysql_error() );
//exit;
}else{
alert("포인트를 충전하세요");
}
참고했는데 값이 4040 이렇게 합쳐지네요