控制中多表查詢(xún)并指定字段
主要用于篩選功能,需要用到多表查詢(xún)
$iteminfo = M("item_info");
$diyawhere['group'] = 'machtype';
$datadiya = $iteminfo->where($diyawhere)->order('sort')->select();
$this->assign('screenmach', $datadiya);
表一:xyh_soft
需要查詢(xún)的全表字段
表二:xyh_item_info
需要查詢(xún)的字段 group 中的machtype下的值
麻煩樓主寫(xiě)一段代碼。并能在靜態(tài)頁(yè)調(diào)用