thinkPHP資料報錯1064

來源:互聯網
上載者:User
我在資料庫中新增欄位

片,新增到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();
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.