我的代码插入到database
中,但(int)
类型的字段仅在视图中显示为零 我这样做;错误将所有值插入到数据库中
$sql="INSERT INTO `patients_list` (`patients_type`,`firstname`,`lastname`,`age`,`gender`,`address`,`mobile_no`,`e-mail`,`date_registered`) VALUES('$patients_type','$firstname','$lastname','$age','$gender','$address','$mobile_no','$e_mail','$date_registered')";
其它值输入数据库但“移动电话号码”仅帖子为零
不要使用符号与整数,如$年龄,而不是'$ age' –
什么是您的数据库方案? INT(11)? INT(1)?你的“观点”是什么意思?你能分享更多的信息/代码示例吗? –
也分享您的表格结构,即手机号码?通过更新您的答案 –