if(is_array($new_risk_arr)){ $res = M("abnormal_index")->fetchSql(true)->addAll($new_risk_arr); } echo $res;