// 자동 배송완료 만들기
$beforedays = date("Y-m-d H:i:s", ( time() - (86400 * (int)$default['de_point_days']) ) ); // 86400초는 하루
$sql22 = " select * from {$g5['g5_shop_cart_table']} where ct_status = '배송' and ct_time <= '$beforedays' ";
$result22 = sql_query($sql22);
for ($i=0; $row22=sql_fetch_array($result22); $i++) {
/*
echo "update {$g5['g5_shop_cart_table']} set ct_status = '완료' where ct_id = '{$row22['ct_id']}' ";
echo "<br>";
echo "update {$g5['g5_shop_order_table']} set od_status = '완료' where od_id = '{$row22['od_id']}' ";
echo "<br>";echo "<br>";
*/
sql_query("update {$g5['g5_shop_cart_table']} set ct_status = '완료' where ct_id = '{$row22['ct_id']}' "); // 오더테이블
sql_query("update {$g5['g5_shop_order_table']} set od_status = '완료' where od_id = '{$row22['od_id']}' "); // 카트테이블
}
허접하지만......그래도.....-_-;
$beforedays = date("Y-m-d H:i:s", ( time() - (86400 * (int)$default['de_point_days']) ) ); // 86400초는 하루
$sql22 = " select * from {$g5['g5_shop_cart_table']} where ct_status = '배송' and ct_time <= '$beforedays' ";
$result22 = sql_query($sql22);
for ($i=0; $row22=sql_fetch_array($result22); $i++) {
/*
echo "update {$g5['g5_shop_cart_table']} set ct_status = '완료' where ct_id = '{$row22['ct_id']}' ";
echo "<br>";
echo "update {$g5['g5_shop_order_table']} set od_status = '완료' where od_id = '{$row22['od_id']}' ";
echo "<br>";echo "<br>";
*/
sql_query("update {$g5['g5_shop_cart_table']} set ct_status = '완료' where ct_id = '{$row22['ct_id']}' "); // 오더테이블
sql_query("update {$g5['g5_shop_order_table']} set od_status = '완료' where od_id = '{$row22['od_id']}' "); // 카트테이블
}
허접하지만......그래도.....-_-;
댓글 18개
@엑스엠엘
// 자동 배송완료 만들기
$beforedays = date("Y-m-d H:i:s", ( time() - (86400 * (int)$default['de_point_days']) ) ); // 86400초는 하루
$sql22 = " select * from update {$g5['g5_shop_cart_table']} A inner join {$g5['g5_shop_order_table']} B using( od_id)
set A.ct_status = '완료', B.od_status = '완료' where A.ct_time < now() - interval 7 day and A.ct_status='배송' ";
$result22 = sql_query($sql22);
for ($i=0; $row22=sql_fetch_array($result22); $i++) {
/*
echo "update {$g5['g5_shop_cart_table']} set ct_status = '완료' where ct_id = '{$row22['ct_id']}' ";
echo "<br>";
echo "update {$g5['g5_shop_order_table']} set od_status = '완료' where od_id = '{$row22['od_id']}' ";
echo "<br>";echo "<br>";
*/
sql_query("update {$g5['g5_shop_cart_table']} set ct_status = '완료' where ct_id = '{$row22['ct_id']}' "); // 오더테이블
sql_query("update {$g5['g5_shop_order_table']} set od_status = '완료' where od_id = '{$row22['od_id']}' "); // 카트테이블
}
이렇게 가 맞나요 ?
// 자동 배송완료 만들기
$beforedays = date("Y-m-d H:i:s", ( time() - (86400 * (int)$default['de_point_days']) ) ); // 86400초는 하루
$sql22 = " select * from update {$g5['g5_shop_cart_table']} A inner join {$g5['g5_shop_order_table']} B using( od_id)
set A.ct_status = '완료', B.od_status = '완료' where A.ct_time < now() - interval 7 day and A.ct_status='배송' ";
$result22 = sql_query($sql22);
for ($i=0; $row22=sql_fetch_array($result22); $i++) {
/*
echo "update {$g5['g5_shop_cart_table']} set ct_status = '완료' where ct_id = '{$row22['ct_id']}' ";
echo "<br>";
echo "update {$g5['g5_shop_order_table']} set od_status = '완료' where od_id = '{$row22['od_id']}' ";
echo "<br>";echo "<br>";
*/
sql_query("update {$g5['g5_shop_cart_table']} set ct_status = '완료' where ct_id = '{$row22['ct_id']}' "); // 오더테이블
sql_query("update {$g5['g5_shop_order_table']} set od_status = '완료' where od_id = '{$row22['od_id']}' "); // 카트테이블
}
이렇게 가 맞나요 ?
게시글 목록
| 번호 | 제목 |
|---|---|
| 1483 | |
| 1481 | |
| 1479 | |
| 1474 | |
| 1473 | |
| 1463 | |
| 1458 | |
| 1457 | |
| 1456 | |
| 1452 | |
| 1449 | |
| 1448 | |
| 1442 | |
| 1441 | |
| 1426 | |
| 1411 | |
| 1389 | |
| 1388 | |
| 1372 | |
| 1359 | |
| 1357 | |
| 1355 | |
| 1348 | |
| 1347 | |
| 1338 | |
| 1332 | |
| 1328 | |
| 1313 | |
| 1307 | |
| 1303 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기