I asked a couple of days ago about datetimes. I was told to use the Current time stamp and it worked fine.

But now I realise that I need to store the datetime in two tables. So what I want to do is copy the current time stamp into a variable and then use the variable to tables via an insert. If I use the current time stamp twice together one maybe a second or so later than the other and so cause problems.

why do you need to store the same value in two tables?

If you copy the value to a variable, even if 10 minutes elapses, then you insert that value into another table it’s going to be the same. The variable won’t ‘sync’ with the current time (unless you are calling the date function again).

You can also copy a value direct from one table to another without SELECTing into PHP first.

Although, as Scallio is getting at, it might not be necessary to store the value twice at all.