## 訂單商品(訂單ID)
```
$ordergoods = pdo_fetchall("select og.id,og.total,og.realprice,g.nocommission from " . tablename('ewei_shop_order_goods') . ' og left join ' . tablename('ewei_shop_goods') . ' g on g.id = og.goodsid where og.orderid=:orderid and og.uniacid=:uniacid', array(':orderid' => $orderid, ':uniacid' => $_W['uniacid']));
foreach($ordergoods as $v){
if(empty($v['nocommission'])){
$hasokgoods = true;
$goodscount += $v['total'];
$commissions = $this->getOrderCommissions($orderid,$v['id']);
$commissionl1 += $commissions['level1'];
$allprice += $v['realprice'];
}
}
```
## 下線人數
```
//直推人數
$ztcount = pdo_fetchcolumn('select count(id) from ' . tablename('ewei_shop_member') . " where uniacid=:uniacid and agentid=:agentid and status=1 and isagent=1 and agentlevel>=0 limit 1", array(':uniacid' => $_W['uniacid'], ':agentid' => $agentuser['id']));
//下級團隊所有ID
$allxj = pdo_fetchall('select id from ' . tablename('ewei_shop_commission_relation') . ' where pid=:pid', array(':pid' => $id), 'id')
;
//直推等于自己級別的直推
$zjcount = pdo_fetchcolumn('select count(*) from ' . tablename('ewei_shop_commission_relation') . ' a left join ' . tablename('ewei_shop_member') . ' m on m.id = a.id where a.pid=:pid and m.status=1 and m.isagent=1 and m.agentlevel=:levelid limit 1', array(':pid' => $agentuser['id'],':levelid' => $levelid));
```
- php調試
- php記錄
- 常用循環
- 日期時間轉換
- 時間格式
- mktime獲取今日昨日本月時間戳
- http_build_query生成請求字符串
- PHP取整的幾種方法
- 微擎記錄
- W全局變量
- Http請求
- 人人商城二開記錄
- 數據處理
- 常用查詢
- 會員信息
- 確認收貨處理
- 維權處理
- 設置讀取和配置
- 報單商品類型屬性
- 團隊傭金
- 自動升級
- 業績分紅
- 前端html和js
- html按鈕提交處理
- 引用js傳參
- 表單
- 表單判斷
- 任務執行
- 提示跳轉頁
- 全局變量
- 訂單交易
- DIY設置
- 系統菜單
- mysql記錄
- 創建表-14
- html和js
- 模板中使用js變量傳參
- js表單處理
- 表單判斷
- js頁面跳轉刷新
- thinkphp幫助
- 導入導出excel