I'm trying to make a query that shows all the results of a table with a couple of parameters and then encode them in json, however in the query I do not show the results of the table, and it only brings me back a single result, which can be my mistake, since I do not see it.
This is the code I'm using
$resultado = mysqli_query($connect, "SELECT * FROM 'transacciones' WHERE 'Usercorreo' = '$Username'");
while($array=mysqli_fetch_array($resultado)) {
$response["ComCorreo"] = $array['ComCorreo'];
$ComCorreo = $array['ComCorreo'];
$response["monto"] = $array['monto'];
$response["fecha"] = $array['fecha'];
$response["concepto"] = $array['concepto'];
$comrsql=mysqli_query($connect,"SELECT * FROM 'comercios' WHERE 'Comcorreo'='$ComCorreo'");
while($rowid=mysqli_fetch_array($comrsql)) {
$response["COMERCIONOMBRE"] =$rowid['nombre'];
$response["COMERCIOLOGO"] =$rowid['logo'];
}
}