Skip to content
Advertisement

SQL query to update item quantity using PHP PDO

Good morning everyone

I am trying to update the table with the new quantity selected, when I run the following function, however, I get this error:

JavaScript

Function to update the quantity, function_products.php:

JavaScript

product_update_process.php

JavaScript

What could be the issue here?

Thanks for your assistance.

Advertisement

Answer

To add to @TangentiallyPerpendicular’s comment, why are you binding to :orderedQuantity? This variable is not being used in your SQL statement, even though you have told the SQL engine to expect the variable. The column doesn’t need to be a variable in order pass a variable to it.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement