I am implementing employee attendance system. Can you please tell me what is wrong in the following query:
INSERT INTO tbtimedetail (outTime) VALUES (NOW()) WHERE empID= '$empid_var' and outTime='NULL';
Structure of tbtimedetail is:
CREATE TABLE tbTimeDetail(
timeID Int PRIMARY KEY AUTO_INCREMENT,
empID Int(5),
dateDetail Date NOT NULL,
inTime Time NOT NULL,
outTime Time NOT NULL,
FOREIGN KEY (empID) REFERENCES tbempdetail (empID)
);