mysql_query("SELECT d.detail_id, p.product_name,p.product_price, d.quantity, d.subtotal, p.product_id
FROM order_detail AS d, product_list AS p, order_tbl AS r
WHERE d.order_id = r.or_id
AND d.product_id = p.product_id //---this is the problem
AND r.or_id = $result[or_id]
") or die(mysql_error());