Expand|Select|Wrap|Line Numbers
- CREATE TABLE `biuproj`.`quiz_taken` (
- `quizid` int(10) unsigned NOT NULL,
- `studentid` int(10) unsigned NOT NULL,
- `starttime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
- `endtime` timestamp NOT NULL default '0000-00-00 00:00:00',
- PRIMARY KEY (`quizid`,`studentid`)
- );
At the end I would like to change the `endtime` field to view the current time (after some time has elapsed, meaning starttime and endtime will be different).
However, when I run the query:
update quiz_taken SET endtime=NOW() where quizid=2 and studentid=111222
It also changet the starttime to view the new time...
What am I doing wrong?