Good evening, learning PHP from the O'Reilly book, "Creating Dynamic Websites ...". Parsed given in the book example on working with the database. The example works only partially, requests for retrieval of information are performed normally, and the deletion or deletion of records displays an error:
`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 'WREHE isbn=147258369147' at line 1
Through the command line requests are performed normally
Code snippets:
$isbn = get_post($conn, "isbn"); $query = "DELETE FROM class WREHE isbn=$isbn"; $result = $conn->query($query); $query = "INSERT INTO class(author, title, category, year, isbn) VALUES ('$author', '$title', '$category', '$year', '$isbn')"; $result= $conn->query($query); I looked through the answers to similar questions, in almost all cases, problems in quotes (backward). In my case, adding quotes to the class, isbn does not help, the error remains.
WHEREand notWREHE- Mike