sql
```
ALTER TABLE `ims_ewei_shop_goods`
ADD COLUMN `isbonus` tinyint(2) NULL DEFAULT 0 ;
```
php
```
$data["isbonus"] = intval($_GPC["isbonus"]);
```
頁面
```
<div class="form-group">
<label class="col-sm-2 control-label">商品類型</label>
<div class="col-sm-9 col-xs-12">
<label class="radio-inline">
<input type="radio" value="0" name="isbonus" {if $item['isbonus']==0}checked{/if} /> 普通商品
</label>
<label class="radio-inline">
<input type="radio" value="1" name="isbonus" {if $item['isbonus']==1}checked{/if} /> 報單商品
</label>
<span class="help-block">報單商品不參與團隊分紅,普通商品參與分紅</span>
</div>
</div>
```
應用
```
$hasokgoods = false;
$ordergoods = pdo_fetchall("select og.id,g.isbonus 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($v['isbonus']==1){
$hasokgoods = true;
}
}
```
- php調試
- php記錄
- 常用循環
- 日期時間轉換
- 時間格式
- mktime獲取今日昨日本月時間戳
- http_build_query生成請求字符串
- PHP取整的幾種方法
- 微擎記錄
- W全局變量
- Http請求
- 人人商城二開記錄
- 數據處理
- 常用查詢
- 會員信息
- 確認收貨處理
- 維權處理
- 設置讀取和配置
- 報單商品類型屬性
- 團隊傭金
- 自動升級
- 業績分紅
- 前端html和js
- html按鈕提交處理
- 引用js傳參
- 表單
- 表單判斷
- 任務執行
- 提示跳轉頁
- 全局變量
- 訂單交易
- DIY設置
- 系統菜單
- mysql記錄
- 創建表-14
- html和js
- 模板中使用js變量傳參
- js表單處理
- 表單判斷
- js頁面跳轉刷新
- thinkphp幫助
- 導入導出excel