嗨iam尝试从列表中删除一条记录,当我点击删除按钮时它显示为已成功删除,并且记录不显示我删除了一旦我刷新它正在显示记录的页面。我需要删除通过比较电子邮件和身份证来记录。这是我的代码。
HTML:
$scope.removeRow = function(){
$scope.salaryInfo = [];
$http({
method : 'POST',
url : '../model/deleteincomesources.php',
headers : {
'Content-Type': 'application/json'
},
data : {"action": "DeleteIncomeSources"}
})
.success(function(data, status, headers) {
console.log("Response data:"+ JSON.stringify(data));
if (data.success != undefined && data.success != '')
{
$scope.salaryInfo.push(data);
}
}).error(function(data, status, headers) {
alert("Error occured while Deleting Data:"+status);
console.log("Error data::::"+ data);
console.log("status::::"+ status);
});
};
的Javascript
$res = "DELETE FROM user_salary_details WHERE email=$userEmailid";
$result=mysql_query($res);
SQL:
DateTime date1 = datetimepicker1.Value;
答案 0 :(得分:0)
您正在传递salary.companyname作为参数,而在您的删除查询中有检查电子邮件的删除查询检查必须在公司名称上不在emailID上