It says the line of it has an error like mysqli_num_rows()
expects parameter 1 to be mysqli_result
,it points to this line $resultCheck = mysqli_num_rows($result);
My code is:
<?php
$sql = "SELECT FROM videos ORDER BY video_id ASC LIMIT 2,1;";
$result = mysqli_query($con, $sql);
$resultCheck = mysqli_num_rows($result);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) { ?>
<li class="jp-playlist-current"><div><a href="javascript:;" class="jp-
playlist-item-remove" style="display: none;">×</a><a href="javascript:;"
class="jp-playlist-item jp-playlist-current" tabindex="0">1. <?php echo
$row['video_name']; ?> <span class="jp-artist">by <?php echo
$row['video_artist']; ?></span></a></div></li>
<?php }
} else {
echo "there are no songs!";
}
?>