ive got a script that supposed to show the items ordered along with the quantity ordered. however it showing the quantity that i have in stock. my is done by joining two of my tables. i dnt know if the problem is that in both my tables i have the same field called quantity. is their a way i can make the quantity read from the order_details table when running through the while loop
$query1 = "SELECT * FROM order_details, products where order_details.orderid='$orderid' and order_details.productid=products.productid";
$result1 = mysql_query($query1)
or die(mysql_error());
$numrows = mysql_num_rows($result1);
while ($row1 = mysql_fetch_array($result1))
{
extract($row1);
echo "| Product Name: ";
echo $product_name;
echo " ";
echo " ";
echo " ";
echo "| Product ID: ";
echo $productid;
echo " ";
echo " ";
echo " ";
echo "| Item Price £";
echo $item_price;
echo " ";
echo " ";
echo " ";
echo "| Quantity Ordered: ";
echo $quantity;
echo "<hr width=50%>";