ectouch 상용 기능

1. ectouch 판 매 량 파일 mobile \ \ include \ apps \ \ default \ \ common \ \ function. php
function get_goods_count($goods_id) 
{
    /*       */
    $period = C('top10_time');
    $ext = '';
    if ($period == 1) {//   
        $ext = "AND o.add_time >'" . local_strtotime('-1 years') . "'";
    } elseif ($period == 2) {//   
        $ext = "AND o.add_time > '" . local_strtotime('-6 months') . "'";
    } elseif ($period == 3) {//    
        $ext = " AND o.add_time > '" . local_strtotime('-3 months') . "'";
    } elseif ($period == 4) {//    
        $ext = " AND o . add_time > '" . local_strtotime(' - 1 months') . "'";
    }
    /*         */
    $sql = 'SELECT IFNULL(SUM(g.goods_number), 0) as count ' .
        'FROM '. M()->pre .'order_info AS o, '. M()->pre .'order_goods AS g ' .
        "WHERE o . order_id = g . order_id " .
        " AND o . order_status = '" . OS_CONFIRMED . "'" .
        /*" AND o . shipping_status " . db_create_in(array(SS_SHIPPED, SS_RECEIVED)) .*/
        " AND o . pay_status " . db_create_in(array(PS_PAYED, PS_PAYING)) .
        " AND g . goods_id = '$goods_id'";
    $result = M()->getRow($sql);
    return $result['count'];
}

2.
 
다음으로 전송:https://www.cnblogs.com/wesky/p/5458665.html

좋은 웹페이지 즐겨찾기