<?php 
include("db_connection.php");
$Mainclass=new DB_Controller();

$Loop=$Mainclass->Fetch_multiple_data("gold_rate_master","Dealer_Rate,Entry_Date,Created_By,Creation_IP","Karat='18K' and Dealer_Rate!='0.00' GROUP BY Entry_Date");
foreach($Loop as $Loop){


$k24 = ($Loop['Dealer_Rate']/0.7500);
$Entry_Date=date('Y-m-d',strtotime($Loop['Entry_Date']));
$Entry_Time=date('H:i:s',strtotime($Loop['Entry_Date']));
$Created_By = $Loop['Created_By'];
$Creation_IP = $Loop['Creation_IP'];


$Mainclass->Insert_Data("gold_rate_log_master","Rate,Entry_Date,Entry_Time,Created_By,Creation_IP","'".$k24."','".$Entry_Date."','".$Entry_Time."','".$Created_By."','".$Creation_IP."' ");

}



?>