A little mySQL help possible to do a Insert on a select ...

The app is going to pass the items via a post / insert: After it completes I need to then get the TIMEDIFF, and write this to TotalSessionTime. Maybe someone can help me on Number 3 below?

1. insert into listeners (WalletKey, StartTime, StopTime) values (:WalletKey, :StartTime, :StopTime);

2. SELECT TIMEDIFF(StopTime, StartTime) from listeners where WalletKey = :WalletKey <--- Trying to get this statement into column TotalSessionTime.

3. Insert listeners SET TotalSessoinTime = SELECT TIMEDIFF(StopTime, StartTime) from listeners where WalletKey = :WalletKey

Thanks!
1 person has
this question
+1
Reply