我在資料庫中新增欄位
片,新增到30個欄位元的時候系統就會報錯
但是如果刪除一個欄位元,29個欄位元的時候,系統就能正常顯示資料了
PS:不管欄位元有多少位的時候,都能擷取資料到資料庫中,就是≥30個欄位元的時候擷取資料後不能顯示到頁面上,報如錯誤,求各位大神幫忙看看怎麼結局。
回複討論(解決方案)
應該是你的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();