How to update the image in the database, namely how to correctly write a request?
INSERT INTO tovars (name) VALUES('$uploadfile') name - the name of the field where the address of the image on the server is stored as /o/1.png $ uploadfile - contains the path of the image that is written to the database. Tell me how to write an update request for pictures in the database. The problem is that I have a picture on a certain line. That is, you need a condition where id = id I tried myself
UPDATE `tovars` SET `name`='$uploadfile' where id=$id does not work