<?php

 include("db.php");


 $select_sql="select * from customerpayment where remove='0' and date='1397-11-23'";
 $select_query=$db ->query($select_sql);
 while($select_row=$select_query ->fetch_array()){
 
   $row_id=$select_row['id'];
   $customerId=$select_row['customerId'];
   $date=$select_row['date'];
   $transactCurrency=$select_row['transactCurrency'];
   $transacttype=$select_row['transacttype'];
   $amount=$select_row['amount'];
   $description=$select_row['description'];
   echo "<br>";
 
 
 
    $insert_sql="insert into customer_statement (reference,transaction_id,customerId,currency_id,amount,date,transaction_type,description) 
	values
	('معاملات مشتری','$row_id','$customerId','$transactCurrency','$amount','$date','$transacttype','$description')";
 
    $insert_query= $db ->query($insert_sql);
 
 }




?>