I have a php page that inserts data into a database.
mysql_query("insert into job_log VALUES ('','$emp_id','$project','', '$now','$clock_actions','$domain')", $db_link);
The problem is I also need the data inserted into a new table with duplicate fields and insted of the data being overwritten, I need the newest data appened to the table.
I have tried update but havent been able to get it to work.
mysql_query("update job_log_time VALUES ('','$emp_id','$project','', '$now','$clock_actions','$domain')", $db_link);
examples:
currently:
table 1
emp_id time action
1 8.00 clock in
2 8.00 clock in
when the employee performs a new action the data is overwritten
table1
emp_id time action
1 10.00 break
2 10.03 break
what I need is this:
table1
emp_id time action
1 8.00 clock in
2 8.00 clock in
1 10.00 break
2 10.03 break