Error: INSERT INTO
tbl_feedback
(case) VALUES ('111111') You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'case) VALUES ('111111')' at line 1
I bet I'm missing something simple, but would you mind taking a look at the below and let me know if you see the error? I had a longer query, but I've reduced it to just 1 value to try and troubleshoot the error with no luck. I've tried adding ticks to the table name, changing the concatenation, and removing fields. I have a working select query that uses the same table.
require 'conn.php';
$sql = "INSERT INTO tbl_feedback (case) VALUES ('$caseNumber')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();