I have a question, I would like to save a UPDATE
within a variable, for example, this is my code:
public static function cancelTareasP(Usuario $_Usuario, $proyecto_id) {
$conex = $_Usuario->getConexBD();
$tareasPend = Tarea::getTareasPendientes($conex);
$ids = array_column($tareasPend, 'id');
foreach ($ids as $id) {
$conex->query("UPDATE Tareas SET estatus = 'Cancelada' WHERE proyecto_id = '$proyecto_id' AND id = '$id'");
}
return regHistorico($conex, 4, 'Tareas', $idTareasModificadas, $proyecto_id);
}
At the moment of doing the UPDATE
the estatus
of the tasks is modified, those changes must be registered in a history, my doubt is if you can save that UPDATE
as a variable ( $idTareasModificadas
) that is the array of id
of the tasks that were modified, in order to make the record.
I hope you have given me to understand.