SQL Syntax Error (Server version: 5.6.17 - MySQL)

前端 未结 3 748
别跟我提以往
别跟我提以往 2021-01-29 09:45


Could you guys please tell me what is missing on this code. because i get SQL Syntax Error.

i have created table with three colums. ID is auto incriminating and Ima

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-29 10:19

    You are trying to insert the value '$img_name' as Name and not img_name content. Try the following:

     $query  = mysqli_query($Con, "INSERT INTO `cars_tbl` (ID,Name,Image) VALUES ('','" . $img_name . "','" . $image . "')");
    

提交回复
热议问题