PHP MySQL Error when inserting into database?

Just replace this function, this might work function get_order_items($id) { $connection = mysql_open(); $query = "select p. Id, oi. Order_id, p.Name, oi.

Quantity, p. Stock, oi. Product_id " .

"from SEOrder_items as oi join SEProducts p on oi. Product_id = p.Id " . "where oi.

Order_id = $id"; $result = mysql_query($query, $connection) or show_error(); mysql_close($connection) or show_error(); $order_items = array(); while ($order_item = mysql_fetch_array($result)) { $order_items = $order_item; } return $order_items; }.

Just replace this function, this might work. Function get_order_items($id) { $connection = mysql_open(); $query = "select p. Id, oi.

Order_id, p. Name, oi. Quantity, p.

Stock, oi. Product_id " . "from SEOrder_items as oi join SEProducts p on oi.

Product_id = p. Id " . "where oi.

Order_id = $id"; $result = mysql_query($query, $connection) or show_error(); mysql_close($connection) or show_error(); $order_items = array(); while ($order_item = mysql_fetch_array($result)) { $order_items = $order_item; } return $order_items; }.

You need to select the field product_id from the database within the function get_order_items. (p. Product_id).

I kinda suck at joins. – JheeBz May 30 at 11:43 There already is a join: join SEProducts as p. Just add p.

Product_id between the SELECT and FROM. – Wesley van Opdorp May 30 at 11:45 Thanks, but sadly this still triggers the error. – JheeBz May 30 at 12:06.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions