0
Original query:
SELECT quantity.order_id, quantity.ISBN, quantity.quantity,orders.customer_id, orders.created, orders.status FROM orders INNER JOIN quantity ON orders.order_id=quantity.order_id"
Query with bind Parameter:
$stmt = $conn->prepare ("SELECT quantity.order_id, quantity.ISBN, quantity.quantity,orders.customer_id, orders.created, orders.status FROM orders INNER JOIN quantity ON orders.order_id=?");
$stmt->bind_param("i",$quantity.order_id);
$quantity.order_id = $_POST['quantity.order_id'];//linha 6
$stmt->execute();
$stmt->get_result();
With the bind Parameter I am having the following error:Parse error: syntax error, Unexpected '=' on line 6
The name of the parameter you receive in the POST seems to be wrong!
– alan
Variable name is already wrong. Not allowed to have
.
.– Woss
how do you suggest I do it? sorry I’m new to PHP
– Diana Madeira
Use underline instead of point to name variables!
– alan
Quantity.order_id is to fetch information the data base is to fetch the order id of the Quantity table!!
– Diana Madeira
see the answer I put, you do not put a column of the table Quantity in the JOIN ON clause, see if the way I put works for you
– Rovann Linhalis