hi, i have some problem with my php code. when i run the php, the page keep loading and no output displayed. here is my code:
$dayBeforeNew = $_GET['daybefore'];
$dayAfterNew = $_GET['dayafter'];
$sql = "SELECT reference.LOCID, reference.Region, Sitename, (SELECT `Data Total Traffic` from 4g_statistic where reference.LOCID = 4g_statistic.LOCID AND 4g_statistic.Day = $dayBeforeNew) as `pre.Data Total Traffic`, (SELECT `L_25_VoLTE Traffic (Erlang)` from 4g_statistic where reference.LOCID = 4g_statistic.LOCID AND 4g_statistic.Day = $dayAfterNew) as `pre.L_25_VoLTE Traffic (Erlang)` FROM reference";
$res = mysqli_query($conn, $sql) or die(mysqli_error($conn));
while($row = mysqli_fetch_array($res))
{
?>
<tr>
<td><?php echo $i; $i++; ?></td>
<td><?php echo $row['LOCID']; ?></td>
<td><?php echo $row['Sitename']; ?></td>
<td><?php echo $row['Region']; ?></td>
<td><?php echo $row['`pre.Data Total Traffic`']; ?></td>
<td><?php echo $row['`pre.L_25_VoLTE Traffic (Erlang)`']; ?></td>
</tr>
<?php
}
i guess the problem is in the sql, because there are select in select statement. but i don't know how to solve it..