Maison > Article > développement back-end > thinkPHP数据报错1064
我在数据库中新增字段
如图片,新增到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();