<?php
include ("../include/db.php");
$sqls6="SELECT * from media_purchase";
$rs116=mysql_query($sqls6);
while($row116=mysql_fetch_object($rs116))
{   
   $media_date=$row116->media_date;
   $media_pur_no=$row116->media_pur_no;
   $Upsql12="update media_pur_sublist set media_date='$media_date',entrydates='$media_date' where media_pur_no='$media_pur_no'";
   mysql_query($Upsql12);   
    $Upsql13="update stock_table set date='$media_date' where ref_id='$media_pur_no'";
   mysql_query($Upsql13);   
}