ThinkPHP data error 1064-php tutorial

Source: Internet
Author: User
Tags sql error
ThinkPHP data error 1064 I added a field to the database

Slice. when it is added to 30 columns, the system reports an error.

However, if you delete one column and 29 columns, the system will be able to display the data normally.
PS: No matter how many bits are in the column, you can get the data to the database, that is, when the number of bits is greater than or equal to 30, the data obtained cannot be displayed on the page, and an error is reported, please help me to see how it ends.


Reply to discussion (solution)

It should be your SQL error. paste the SQL statement you executed

Use getLastsql () to print the SQL statement.

It should be your SQL error. paste the SQL statement you executed


Errors may occur in three locations.
Case 'submit ': $ this-> assign ("folder_name", 'committed'); $ map ['User _ id'] = array ('EQ ', $ user_id); $ map ['step'] = array ('GT ', 10), array ('EQ', 0), or '); break; case 'save': $ this-> assign ("folder_name", 'approved '); $ 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 ", 'to be reviewed'); $ 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;

The poster, you paste the code and paste the SQL execution statement.

$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();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.