0
I am in need of help to resolve this error!!!
Warning: mysqli_fetch_object() expects Parameter 1 to be mysqli_result, Boolean Given in /home/omeganim/public_html/index.php on line 39
The code is this:
$pagCorrente = 1;
if(isset($_GET['pag'])){
$pagCorrente = (int)$_GET['pag'];
}
$mostrar = 10;
$pagCorrente = $pagCorrente * $mostrar - $mostrar;
$sql = "SELECT count(id) as total FROM listas";
$ex = $conexao->query($sql);
$total = mysqli_fetch_object($ex);
$total = $total->total;
$quantPages = ceil($total / $mostrar);
$sql = "SELECT * FROM listas ORDER BY id desc LIMIT $pagCorrente,$mostrar";
$wx = $conexao->query($sql);
while($linha = mysqli_fetch_object($wx)){
?>
<div class="engloba1">
<div>
<a href="<?php echo SITE . 'nomes.php?id='.$linha->id; ?>">
<img src='<?php echo SITE . 'php/upload/' . $linha->imagen;?>' />
<div class='box'>
<p>
<br><?php echo $linha->titulo;?> </br>
</a>
<a href="<?php echo SITE . 'nomes.php?id='.$linha->id; ?>">
<br><?php echo $linha->nome;?> </br>
<br><?php echo $linha->epi;?> </br>
</a>
</p>
</div>
</div>
</div>
<?php } ?>
Thank you in advance!!
welcome rafael, the error is on line 39 and you only posted 4 lines, publish your code so we can analyze the error.
– user60252