I have this WebService in php and MySQL and the intention is to do the $ query2 (which is an update) and then execute the $ query that is a SELECT.
As I see in phpMyAdmin you are running the UPDATE, but the client is not receiving the SELECT. I have checked the phpMyAmdin queries so I will not put the SQL statement as they are correct, unless you ask for it.
PHP Code:
$consulta1 = $_POST["consulta"];
$consulta2 = $_POST["consulta2"];
$resultado2 = mysqli_query($mysqli,$consulta2);
if ($resultado2)
{
mysqli_free_result($resultado2);
$resultado= mysqli_query($mysqli,$consulta);
$arraySalida = array();
while($registro = mysqli_fetch_assoc ($resultado) ):
$cadena = "{$registro['nom']};{$registro['per']};{$registro['lug']};{$registro['est']};{$registro['hEnt']};{$registro['hR']};{$registro['hE']};{$registro['hC']};{$registro['obs']};{$registro['pri']};{$registro['idI']};{$registro['ref']};{$registro['fra']};{$registro['eq']};{$registro['dificultad']}";
$arraySalida[]= $cadena;
endwhile;
echo implode("<",$arraySalida);
mysqli_free_result($resultado);
}
The problem that I have detected is that once it does a mysqli_query and does not do the other, I tried to do the mysqli_query of the UPDATE before the echo implode () and it updates the database but does not send me the select of the echo implode (). And if I only do the SELECT I receive the data in the client