请纠正我这里,我试图更新或插入值在现有的行在我的数据库中,但不能这样做,所有的变量是工作的,但它没有进入数据库也检查在phpmyadmin sql查询,但它也没有工作,那里它显示成功,但没有一个数据进入mysql列。。
include("connect.php");
$sql = "UPDATE tblapps SET applsex='$applsex', placbrth='$placbrth', countrybrth='$countrybrth', religionxx='$religionxx', visualmark='$visualmark', edu_id='$edu_id', nationality_by='$nationality_by', prev_nationality='$prev_nationality', issueplace='$issueplace', expirydate='$expirydate', othpassport='$otherpassport', oth_passportno='$oth_pass_no', oth_pptissueplc='$oth_ppt_issue_place', oth_pptissuentl='$oth_ppt_nationality', country_issue='$country_issue', previssuedate='$previssuedate' WHERE app_id=$appid";
if(mysqli_query($link, $sql)){
echo "Records were updated successfully.";
} else {
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
?>
这是个错误,我明白了。
ERROR: Could not able to execute UPDATE tblapps SET applsex='', placbrth='delhi', countrybrth='United States', religionxx='CHRISTIAN', visualmark='', edu_id='GRADUATE', nationality_by='By Birth', prev_nationality='', issueplace='delhi', expirydate='2018-11-01', othpassport='on', oth_passportno='9876546789', oth_pptissueplc='delhi', oth_pptissuentl='United States', country_issue='', previssuedate='2018-01-02' WHERE app_id='1515130357782247085'. Unknown column 'othpassport' in 'field list'
2条答案
按热度按时间qyswt5oh1#
“字段列表”中的未知列“othpassport”
这意味着在您的数据库表中不能使用othpassport Column。请检查表或重命名它。
希望对你有帮助。
mkshixfv2#
出现错误:“字段列表”中的未知列“othpassport”
我的意思是
othpassport
Column在数据库表中不可用,或者键入了错误的Column。根据你的编码风格,我认为列名可能是otherpassport
. 希望对您有所帮助,谢谢!!