0 $xfilter"; $xstmt_up= $link_id->prepare($xqry_up); $xstmt_up->execute($arr_params); $xqry_up1="UPDATE employee_estimate set settofixtax='N' where fixtax=0 $xfilter"; $xstmt_up1= $link_id->prepare($xqry_up1); $xstmt_up1->execute($arr_params); $xqry_emp="SELECT * from employeefile where recid > 0 $xfilter"; $xstmt_emp= $link_id->prepare($xqry_emp); $xstmt_emp->execute($arr_params); $xrs_emp=$xstmt_emp->fetch(); $xqry_estimate="SELECT * from employee_estimate where empcode= ?"; $xstmt= $link_id->prepare($xqry_estimate); $xstmt->execute(array($xrs_emp['empcode'])); $xrs_estimate=$xstmt->fetch(); if($xrs_estimate!='') { $xqry_del="DELETE from employee_estimate where empcode= ?"; $xstmt_del= $link_id->prepare($xqry_del); $xstmt_del->execute(array($xrs_emp['empcode'])); } $xrs_estimate['empcode'] = $xrs_emp['empcode']; $xrs_estimate['fullname'] = $xrs_emp['fullname']; $xrs_estimate['taxcode'] = $xrs_emp['taxcode']; $xrs_estimate['paygroup'] = $xrs_emp['paygroup']; $xrs_estimate['monthlyrate'] = $xrs_emp['monthlyrate']; $xrs_estimate['dailyrate'] = $xrs_emp['dailyrate']; $xrs_estimate['fixtax'] = $xrs_emp['fixtax']; $xarr= array(); $xarr['empcode'] = $xrs_estimate['empcode']; $xarr['fullname'] = $xrs_estimate['fullname']; $xarr['taxcode'] = $xrs_estimate['taxcode']; $xarr['paygroup'] = $xrs_estimate['paygroup']; $xarr['monthlyrate'] = $xrs_estimate['monthlyrate']; $xarr['dailyrate'] = $xrs_estimate['dailyrate']; $xarr['fixtax'] = $xrs_estimate['fixtax']; if($xarr['empcode']!='') { PDO_InsertRecord($link_id,'employee_estimate', $xarr, false); } } ?>