I already found another solution, since I did not find a solution to empty several tables with a sequence in MySQL, what I did was put all the AJAX calls in an AJAX.
like this:
var fecha = $("#form_fecha").serialize();
$.ajax({
type:"POST",
url:"eliminar_todo_vacaciones_navidad.php",
data:fecha,
success:function(x){
if (x==1) {
var fecha = $("#form_fecha").serialize();
$.ajax({
type:"POST",
url:"eliminar_todo_inicio_curso1.php",
data:fecha,
success:function(y){
if (y==1) {
var fecha = $("#form_fecha").serialize();
$.ajax({
type:"POST",
url:"eliminar_todo_vacaciones_pascua.php",
data:fecha,
success:function(z){
if (z==1) {
var fecha = $("#form_fecha").serialize();
$.ajax({
type:"POST",
url:"eliminar_todo_dias_festivos.php",
data:fecha,
success:function(){
}
});
}
}
});
}
}
});
}
}
}).done(function(){
$("#correcto_eliminar").animate({
top:"2%"
},500);
$("#correcto_eliminar").delay(1000);
$("#correcto_eliminar").animate({
top:"-15%"
},500);
}).fail(function(){
$("#error_eliminar").animate({
top:"2%"
},500);
$("#error_eliminar").delay(1000);
$("#error_eliminar").animate({
top:"-15%"
},500);
});
Logically. And it worked to me also logically if any AJAX request fails me it will show me what I have put in fail () and if all are correct, it will do what I do in the done ().
Thanks for your interest.