我的代碼插入到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)?你的「觀點」是什麼意思?你能分享更多的信息/代碼示例嗎? –
也分享您的表格結構,即手機號碼?通過更新您的答案 –