$strSQL = "SELECT * FROM sale_edit INNER JOIN sale_edit_log on sale_edit.Rec_Id = sale_edit_log.Rec_Id AND sale_edit.Drg_Id = sale_edit_log.Drg_Id AND sale_edit.Drg_Name = sale_edit_log.Drg_Name AND sale_edit.No = sale_edit_log.No WHERE sale_edit.Created BETWEEN '".$year.-$month.-$day."' AND '".$toyear.-$tomonth.-$today."' AND sale_edit.Drg_Name ='".$Drg_Name."' ";
$strSQL = "SELECT * FROM sale_edit INNER JOIN sale_edit_log on sale_edit.Rec_Id = sale_edit_log.Rec_Id AND sale_edit.Drg_Id = sale_edit_log.Drg_Id AND sale_edit.Drg_Name = sale_edit_log.Drg_Name AND sale_edit.No = sale_edit_log.No WHERE sale_edit.Created BETWEEN '".$year.-$month.-$day."' AND '".$toyear.-$tomonth.-$today."' AND sale_edit.Drg_Name ='".iconv( 'UTF-8','TIS-620',$Drg_Name)."' ";