时间:2021-07-01 10:21:17 帮助过:35人阅读
应该是你的sql 错了,贴出你执行的 sql
用getLastsql()打印一下sql出来看看
应该是你的sql 错了,贴出你执行的 sql
case 'submit' : $this -> assign("folder_name", '已提交'); $map['user_id'] = array('eq', $user_id); $map['step'] = array( array('gt', 10), array('eq', 0), 'or'); break; case 'finish' : $this -> assign("folder_name", '已审批'); $FlowLog = M("FlowLog"); $where['emp_no'] = $emp_no; $where['is_del'] = 0; $where['_string'] = "result is not null"; $log_list = $FlowLog -> where($where) -> field('flow_id') -> select(); $log_list = rotate($log_list); if (!empty($log_list)) { $map['id'] = array('in', $log_list['flow_id']); } else { $map['_string'] = '1=2'; } break;case 'confirm' : $this -> assign("folder_name", '待审批'); $FlowLog = M("FlowLog"); $where['emp_no'] = $emp_no; $where['is_del'] = 0; $where['_string'] = "result is null"; $log_list = $FlowLog -> where($where) -> field('flow_id') -> select(); $log_list = rotate($log_list); if (!empty($log_list)) { $map['id'] = array('in', $log_list['flow_id']); } else { $map['_string'] = '1=2'; } break;
楼主,你这贴的是代码,将sql的执行语句贴出来
$plugin['date'] = true; $this -> assign("plugin", $plugin); $emp_no = get_emp_no(); $user_id = get_user_id(); $flow_type_where['is_del'] = array('eq', 0); $flow_type_list = M("FlowType") -> where($flow_type_where) -> getField("id,name"); $this -> assign("flow_type_list", $flow_type_list); $map = $this -> _search(); if (method_exists($this, '_search_filter')) { $this -> _search_filter($map); } $folder = $fid; $this -> assign("folder", $folder); $this -> _flow_auth_filter($folder, $map); $model = D("FlowView"); if (I('mode') == 'export') { $this -> _folder_export($model, $map); } else { $this -> _list($model, $map, 'id desc'); } $this -> display();