Arbitrary update of fields - Strange ...
Hi,
I have a very strange behavior with mysql and I can't explain it:
I created a time tracking program - part tablet / Android, the other part mysql and php.
To record the breaks, there is a startpause.php and a stoppause.php
If StartPause is pressed, a time stamp is set in the employee's master record to the pauseStart (datetime) field (NOW ()) and the status field to 1. If Stop PAUSE is pressed, the status field is calculated to 0 and for the minutes field the time between Stop and NOW () is calculated.
BUT: STOP PAUSE no longer sets the status to 0, because "at some point" the time stamp is no longer in the pauseStart field, but is set to NULL on its own!
And this is COMPLETELY strange:
When I start the break, it looks like this: see screenshot 2020-07-08 at 11.31.43
If I end the break now, that would also work, the status is set to 0.
SOMEWHERE, however, the pauseStart field is reset to NULL without us having changed anything. Just because. Now you can of course no longer calculate the pause time, but at the same time the status is no longer set to 0 even with PAUSE STOP! See screenshot 2020-07-08 at 11.41.07.
The time stamp remains in the test database, but not in the real database (perhaps because movements are taking place here)
Once more:
Overall, the whole project is quite manageable. But while everything remains with the test database without movement, it is set to NULL in the production database, in which breaks are started, stopped, times are entered, etc. Everything in test and production right away!
Maybe not mysql, but maybe a transaction side effect.
I am in despair ...
TWR