On my client's PHP-based site that uses MySQL, users should populate employee evaluation data. But in two moments, I have received notifications from users who will continue the reviews and have their data "lost". In this case of continuing evaluations, at the time of registering the data in the MySQL database table, UPDATE statements are used.
Looking at the records in the MySQL table, this "missing" data gets zero values (when fields are numeric), empty (when they are characters), and calendar dates 0000-00-00.
Below is a more summarized example of this UPDATE statement in MySQL:
$sql = "UPDATE wt_aval_avaliacao_analista SET
autonomia = '".$_POST['autonomia']."', autonomiaexemplo = '".$_POST['autonomiaExemplo']."',
autonomiagestor = '".$_POST['autonomiagestor']."', autonomiaexemplogestor = '".$_POST['autonomiaExemploGestor']."',
autonomiaconsenso = '".$_POST['autonomiaconsenso']."', autonomiaexemploconsenso = '".$_POST['autonomiaExemploConsenso']."',
agilidade = '".$_POST['agilidade']."', agilidadeexemplo = '".$_POST['agilidadeExemplo']."',
agilidadegestor = '".$_POST['agilidadegestor']."', agilidadeexemplogestor = '".$_POST['agilidadeExemploGestor']."',
agilidadeconsenso = '".$_POST['agilidadeconsenso']."', agilidadeexemploconsenso = '".$_POST['agilidadeExemploConsenso']."',
carreira1 = '".$_POST['carreira1']."', carreira2 = '".$_POST['carreira2']."', carreira3 = '".$_POST['carreira3']."',
carreira4 = '".$_POST['carreira4']."', carreira5 = '".$_POST['carreira5']."', carreira6 = '".$_POST['carreira6']."',
resultados = '".$_POST['resultados']."', resultadosrelacao = '".$_POST['resultadosrelacao']."',
comentarioscolaborador = '".$_POST['comentarioscolaborador']."',
comentariosgestor = '".$_POST['comentariosgestor']."',
comentariosgerente = '".$_POST['comentariosgerente']."',
concluido = '".$concluir."'
WHERE idperiodo = " . $_SESSION['idPeriodo'] . " AND idcolaboradoravaliado = " . $_SESSION['idColaborador'];
$q = Doctrine_Manager::getInstance()->getCurrentConnection();
$q->execute($sql);
What can happen to cause this failure in the MySQL UPDATE statement? Is it related to session time that the user is logged in? Anything related to memory, browser that is used, table configuration?