java - MySQL: Attendance Monitoring App Trouble -
how update specific field without replacing other fields same row field.
for example: want change this.(figure 1)
date_id employee_id time_in time_out 1 3 1:00p 2:00p 2 2 3:20p 3:49p 3 2 3:20p 3:49p
to (figure 2)
date_id employee_id time_in time_out 1 3 1:00p 2:00p 2 2 3:20p 3:49p 3 2 > 5:10p 6:29p <
but happen is, goes figure 1 again. on writing fields same value employee_id. other ways of doing this?
the query used:
update 'attendance' set time_out = ? employee_id = ?
yes i'm making simple time in , time out application(java).
[solved problem] not question, there no way update using 'employee_id'.
as chalitha lawanga said, little simpler:
update 'attendance' set time_out = ? date_id = ?
if date_id
pk, employee_id
not needed in statement.
Comments
Post a Comment