$("#gerar-senha").on("click", function(){
$.ajax({
url: "gerar-valores-randomicamente.php",
type: "POST",
data: $("#formulario").serialize(),
success: function(data){
$("#myModal").modal();
$("#myModal").find("#modal-body").append(data);
}
});
});
My idea is to open a modal and add an update log while the query
is being rolled.
Is there anything in the ajax
function that prints the data while the query is running? with success
the request only appears when it succeeds.
For example:
$id = "1" ;
do{
//faz o update
$result = $database->update($query, array(":id",$id));
$id++;
echo "coluna ".$id." fez o update com sucesso";
}
while($id <= "2000");
within the modal:
| column 1 did the update successfully;
| column 2 did the update successfully;
| checking // while the query is being run
| column n did the update successfully; // after checking, it shows if it was updated or not