1
I have this error in my application:
Call to a Member Function fetch_assoc() on Boolean
Running the same application on the local server and returns no error, on the dist server, returns the above error.
Error is generated on this line:
<?php
$photos = $conexao->query("SELECT * FROM images WHERE galeria_id = {$album_id}");
while($photo_data = $photos->fetch_assoc()) { ?>
<div class="col-lg-4">
<div class="thumbnail">
<img class="img-responsive" src="admin/webroot/img/galerias/<?php echo $album_id; ?>/<?php echo $photo_data['image'] ?>" />
</div>
</div>
<?php } ?>
The point that must have generated this error is
{$album_id}
be null/empty– rray
the
$conexão->query(...)
returnsfalse
if the query fails. Probably your album_id is null, empty or a string, and so the error occurs.– Elias Soares
I was giving error for not receiving the attribute get that came from another page.
– Anderson Galdino