我不断收到下面写的错误:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '
我正在尝试执行此查询:
mysqli_query($con, "INSERT INTO `Water_Usages`
(`Counter_ID`, `Initial_usage`, `ending_usage`,
`Water_used`, `beginning_date`, `ending_date`,
`Flat_ID`, `Receiving_date`)
VALUES ($Counter_ID, $begining_use, $end_use,
$difference, '$beginning_date', '$ending_date',
$Flat_ID, $Receiving_date)")
or die(mysqli_error($con));
我认为查询编写正确,但是我一直收到错误消息。 也许有人可以找到错误?
如果需要更多详细信息,请在评论中提问!