我有很大的问题。我不知道为什么,但在我做这个的两天:
$date_current = date('Y-m-d H:i:s');
$mysql = @mysql_query("UPDATE aso_repairs SET
repairs_date_end = '$date_current',
repairs_sendnoticer_email_end = 'Sending',
repairs_sendnoticer_sms_end = 'Sending'
WHERE repairs_id = '$repairs_id'
");
if (!$mysql) {
die(mysql_error());
}
我收到错误:Unknown column 'repairs_sendnoticer_email_end' in 'field list'.
此列存在于表格中(结构pastebin.com/CW42nc3N)。问题在哪里?
答案 0 :(得分:0)
我认为你必须在repairs_sendnoticer_email_end
之前在sql查询中添加“你的日期。试试这个:
$date_current = date('Y-m-d H:i:s');
$mysql = @mysql_query("UPDATE aso_repairs SET
repairs_date_end = \"'$date_current'\",
repairs_sendnoticer_email_end = 'Sending',
repairs_sendnoticer_sms_end = 'Sending'
WHERE repairs_id = '$repairs_id'
");
if (!$mysql) {
die(mysql_error());
}
答案 1 :(得分:0)
试试这个:
$date_current = date('Y-m-d H:i:s');
$mysql = @mysql_query("UPDATE aso_repairs SET
repairs_date_end = \"'$date_current'\",
repiars_sendnoticer_email_end = 'Sending',
repiars_sendnoticer_sms_end = 'Sending'
WHERE repairs_id = '$repairs_id'
");
if (!$mysql) {
die(mysql_error());
}