cut a long story short I have 2 tables, one called orders_total and another called orders_complete.
the total_oders table contains rows of what the customer has ordered to eat i.e.
colum called 'item' contains the item description
colum called 'cost' contains the item cost
for example
i can sucessfully display the below using where statement
12 inch pinnaple pizza
9 inch pizza £8
half pound burger £3.40
$result7 = mysql_query("SELECT * from order_total");
while($row = mysql_fetch_array($result7))
{
$totalitem = $row['item'];
$totalcost = $row['cost'];
$t = $totalitem.' '.$totalcost.', ';
}
basically i need the data transfering from total_orders into a colum called ord_descr in table orders_complete
my 1st query would be to select * from total_orders then using the mysql_fetch_array with the where statement resturns sucessfully the data from total_orders. but when I try to insert the data into colum item in the orders_complete table it only seems to be displaying the last line i.e. half pound burger 3.40 and not all the information.
$result7 = mysql_query("SELECT * from order_total");
while($row = mysql_fetch_array($result7))
{
$totalitem = $row['item'];
$totalcost = $row['cost'];
$t = $totalitem.' '.$totalcost.', ';
}
mysql_query("UPDATE orders_complete SET ord_descr='$t' WHERE date='06/11/08' and time='13:33:53'")
or die(mysql_error());