I stored two time values in mysql data as 'starttime' & 'endtime'.
I have another column to store the' duration '(which will contain 'endtime-starttime')

Is there a way to add values to ' duration ' automatically when I insert values to 'start time' & 'end time'.
I use WAMP ..I wanna do it through Mysql....rather than through application...

Is it possible.... how?

thankx in advance.

(All the columns contain datatype 'time')

Recommended Answers

All 5 Replies

Isn't this the complication of the simple thing and a duplicate thread.
somebody just wrote solution in php for this.

Isn't this the complication of the simple thing and a duplicate thread. somebody just wrote solution in php for this.

His question was to add dates to columns automatically. Ergo, the use of triggers. Please clarify how php would solve this.

His question was to add dates to columns automatically. Ergo, the use of triggers. Please clarify how php would solve this.

yeh...can any 1 help please....

Did you check the links, and tried it ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.