0
I have the following code:
<?PHP
$status = mysqli_query($connecta, "SELECT `online` FROM `char` WHERE `name`='[ADM] koda'");
$resultado = mysqli_num_rows($status);
echo '
<tr align="center" id="player">
<td align="center" bgcolor="#FFFFFF">posicao</td>
<td align="center" bgcolor="#FFFFFF">name</td>
<td align="center" bgcolor="#FFFFFF">guilda</td>';
if($resultado == 0) {
echo '<td align="center" bgcolor="#FFFFFF">off</td></tr>';
}
if ($resultado == 1) {
echo '<td align="center" bgcolor="#FFFFFF">on</td></tr>';
}
?>
Problem: Even with the query with the value in the database at 0, it still shows echo 'on'. The query in SQL returns correctly,the problem is logic in the IF. Does anyone know any solution?
That’s right :) Thank you!
– GGirotto