php添加代码,本机通过上传至服务器就不能添加数据
PHP code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->
$SetID=$_REQUEST[ID];
//分离价格类型
$temp_day = "";
$temp_ary = $_POST[SetCountID];
for($a=0;$a<count empty : if>1){
$temp_day="0,".$temp_day;
}else{
$temp_day=$temp_day;
}
///分离出发日期
$temp_str = "";
$shyt = $_POST[SetCountID2];
for($i=0;$i<count empty : for day into setdays echo mysql_query></count></count>
折腾了好几天了,sql语句也都能得到,相应的数值就是添加不上
CREATE TABLE `setdays` (
`ID` int(11) NOT NULL auto_increment,
`TeamDate` date NOT NULL,
`ReturnDate` date NOT NULL,
`PlaneNums` 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
到底是什么原因,没有任何报错。郁闷中
------解决方案--------------------先看看在服务器上能不能连接到数据库
------解决方案--------------------echo $Insert_Days;
贴出结果
------解决方案--------------------
有的服务器上的数据库,插入记录时,所有的字段都必须给个默认值,如果没给,就插入不成功,不知道楼主的是否是这种情况
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn