Add code in php. data cannot be added when the local machine passes down to the server.

Source: Internet
Author: User
Php adds code. the local machine cannot add data PHPcode $ SetID $ _ REQUEST [ID] after uploading to the server. The price type is separated. $ temp_day & quot ;; $ temp_ary $ _ POST [SetCountID]; for ($ a0; $ a & lt; count ($ temp_ary); $ a ++) {$ temp_day php add code, data cannot be added when the local machine is uploaded to the server.
PHP code
  $ SetID =$ _ REQUEST [ID]; // Price type of separation $ temp_day = ""; $ temp_ary =$ _ POST [SetCountID]; for ($ a = 0; $
  
   
1) {$ temp_day = "0 ,". $ temp_day;} else {$ temp_day = $ temp_day;} // separate departure date $ temp_str = ""; $ shyt = $ _ POST [SetCountID2]; for ($ I = 0; $ I
   
  


After several days of hard work, SQL statements can also be obtained. the corresponding value cannot be added.

Create table 'setdays '(
'Id' int (11) not null auto_increment,
'Teamdate' date not null,
'Returndate' date not null,
'Plannums' int (11) not null default '0 ',
'Takenums' int (11) not null default '0 ',
'P _ id' int (11) not null default '0 ',
'Bookingid' varchar (255) not null,
'Yndisable' int (11) not null default '0 ',
'Adddate' datetime not null,
Primary key ('id ')
ENGINE = InnoDB AUTO_INCREMENT = 160 default charset = gbk

No error is reported. Depressed

------ Solution --------------------
Check that the server cannot connect to the database.
------ Solution --------------------
Echo $ Insert_Days;
Post result
------ Solution --------------------
Some databases on the server, when inserting records, all fields must be given a default value. if not, the insertion will fail. I don't know if the landlord is in this situation.

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.