PHP update table in MySQL not working

前端 未结 2 581
野的像风
野的像风 2021-01-29 08:59

My php won\'t update my products table. I know my GET request worked as I tested it with echo to display the id. I am confused as to how I can get it to work? I think it may be

2条回答
  •  日久生厌
    2021-01-29 09:25

    There are two issues with your query...

    You Have one extra comma before the Where Section and your missing delimeters on p_stock.

    Should be: "p_stock = '" . $_POST["updateProductStock"] . "' " and . "WHERE id='" . $_GET['id'] . "'";

提交回复
热议问题