thinkphp Data Error 1064

Source: Internet
Author: User
I added a field to the database

The system will error when added to the 30-column number.

However, if you delete a field number and 29 fields, the system will display the data normally.
PS: Regardless of the number of columns in the time, can get data into the database, that is ≥ 30 field number when the data can not be displayed on the page, reported such as errors, ask the great God to help you see how the end.


Reply to discussion (solution)

It should be your SQL error, post the SQL you executed

Print the SQL with Getlastsql () and look at it.

It should be your SQL error, post the SQL you executed


Three places will make a mistake.
Case ' Submit ': $this-Assign ("Folder_name", ' submitted '), $map [' user_id '] = array (' eq ', $user _id); $map [' step '] = Array (arr Ay (' GT ', ' ten '), Array (' EQ ', 0), ' or '); Break;case ' Finish ': $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 Select ($where), field (' flow_id '), $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", ' pending approval '); $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

Lou Zhu, this is your code, 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.