Insert into Attendancemst
( emp_code, name, date, timetable, on_duty, out_duty, clockin, clockout,
late, early, mis_in, mis_out, absent, halfday, total_time
)
values
(pemp_code, pname, pdate, ptimetable, pon_duty, pout_duty, pclockin, pclockout,
plate, pearly, pmis_in, pmis_out, pabsent, phalfday, ptotal_time
)
ON DUPLICATE KEY UPDATE emp_code=pemp_code and date = pdate;
views:
30answers:
1
+1
A:
hello,
first you need to check record in Attendancemst table
like
datatable dt = obj.select("select * from Attendancemst where emp_code=" + empcode + ");
if(dt.row.count > 0) { // update function } else { // insert function }
Are you answering yourself?
Felix Kling
2010-05-25 13:53:10
If there is no question can there be an answer?
APC
2010-05-25 16:45:29