如何检查使用的查询是更新我的表或不使用 php
下面是我的代码
$sql_query = "update companies set
first_name = '$first_name',
last_name = '$last_name',
designation = '$designation',
company_name = '$company_name',
street_address = '$street_address',
city_code = '$city_code',
telephone_number = '$telephone_number',
mobile_number = '$mobile_number',
fax_number = '$fax_number'
where company_code='1001';";
if (!mysqli_query($conn_1,$sql_query) )
{
$_SESSION['error_details'][0] = 'no';
$_SESSION['error_details'][1] = 'Sorry, not update!';
}
else
{
$_SESSION['error_details'][0] = 'yes';
$_SESSION['error_details'][1] = 'Thank you, update sucessfully!';
}
如何在“如果条件”中检查此更新