irenaught
08-04-2008, 09:42 AM
This is an on going problem.
//this query should get all stock items added to order by user
$current_order_qry = "SELECT item_id FROM orderitems WHERE order_id= $oid[order_id] ORDER BY item_id";
$order_result = mysql_query($current_order_qry) or die ("Cannot get items on order: ".mysql_error());
while($orderitems = mysql_fetch_array($order_result)){
$itemids[]=$orderitems;
}
echo "Order # \".$oid[order_id].\" is now complete please click Invoice Version at the bottom of the page to see the final invoice and print it.";
echo "<br/>";
while($row=mysql_fetch_array($itemids['item_id']))
{
echo "The items on the order are".$row['item_id'];
}
The variable "$itemids" when used with a print_r statement contains all the data i need. It is a list of item ids. I need to use them independently afterwards so they need to be strings individually. Please help me it's been three days I need this data. The code above outputs nothing Ive tried so many things and had some advice already but nothing works. Any help would be great.
//this query should get all stock items added to order by user
$current_order_qry = "SELECT item_id FROM orderitems WHERE order_id= $oid[order_id] ORDER BY item_id";
$order_result = mysql_query($current_order_qry) or die ("Cannot get items on order: ".mysql_error());
while($orderitems = mysql_fetch_array($order_result)){
$itemids[]=$orderitems;
}
echo "Order # \".$oid[order_id].\" is now complete please click Invoice Version at the bottom of the page to see the final invoice and print it.";
echo "<br/>";
while($row=mysql_fetch_array($itemids['item_id']))
{
echo "The items on the order are".$row['item_id'];
}
The variable "$itemids" when used with a print_r statement contains all the data i need. It is a list of item ids. I need to use them independently afterwards so they need to be strings individually. Please help me it's been three days I need this data. The code above outputs nothing Ive tried so many things and had some advice already but nothing works. Any help would be great.