<code lang="php">
<div class="sidebar_content">
<?php
$sidebar = mysqli_query($connection, "SELECT * FROM `videos` WHERE `views` DESC LIMIT 5");
?>
<ul>
<li>
<?php
while ( $bar = mysqli_fetch_array($sidebar) )
{
?>
<div class="img_sidebar"><img src="../media/images/<?php echo $bar['img']; ?>"></div>
<div class="title_sidebar"><?php echo $bar['title']; ?></div>
<?php
}
?>
</li>
</ul>
</div>
</code>
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in Из-за чего она происходит?