Closed. This question is off-topic。它当前不接受答案。
想改善这个问题吗? Update the question,所以它是on-topic,用于堆栈溢出。
5年前关闭。
我收到此错误:
对于此查询:
而且我无法弄清楚是什么原因造成的,我已经尝试了所有可以想到的方法,但是我对MySQL查询并不十分了解。
编辑:
我现在已经解决了这个问题,现在纠正的另一个错误是我错过了会话变量周围的',例如:
想改善这个问题吗? Update the question,所以它是on-topic,用于堆栈溢出。
5年前关闭。
我收到此错误:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
对于此查询:
$insert = mysql_query("INSERT INTO bookings (product_code, email, delivery, del_date, col_date, booking_date, event_type, quantity, cost) VALUES (".$_SESSION["booking"].", ".$_SESSION["logged_in"].", ".$_SESSION["delivery"].", ".$_SESSION["del_date"]", ".$_SESSION["col_date"].", ".$current_date.", ".$_SESSION["event_type"].", ".$_SESSION["quantity"].", ".$_SESSION["price"].")");
而且我无法弄清楚是什么原因造成的,我已经尝试了所有可以想到的方法,但是我对MySQL查询并不十分了解。
编辑:
我现在已经解决了这个问题,现在纠正的另一个错误是我错过了会话变量周围的',例如:
VALUES ("'".$_SESSION["variable"]."', '".$_SESSION["variable2"]."'")
最佳答案
您的字符串中缺少点。