Предупреждение: mysql_num_rows () ожидает, что параметр 1 будет ресурсом,
у меня есть ошибка говорит он
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\amargaforum\questions.php on line 39
вот код
Что я уже пробовал:
<?php session_start(); require("header.php"); require("checkUser.php"); $id=$_GET["id"]; $page = $_GET['page']; $var=$page*4-4; ?> <style> .pagination a { color: black; float: center; padding: 8px 16px; text-decoration: none; transition: background-color .3s; } .pagination a.active { background-color: black; color: white; } .pagination a:hover:not(.active) {background-color: #ddd;} </style> <a class="btnS" href="question.php?stid=<?php echo $id ?>">Ask Question</a> <hr /> <?php $str="SELECT * FROM question, user WHERE question.user_id=user.user_id and subtopic_id=$id Limit $var,4"; $result=ExecuteQuery($str); $no_rows = mysql_num_rows($result); if ($no_rows > 0) { while($row = mysql_fetch_array($result)) { $rowsc=ExecuteQuery("SELECT count(*) as counter from answer where question_id=$row[question_id]"); $rowc = mysql_fetch_array($rowsc); $count = $rowc['counter']; echo "<h4>"; echo "<span class='box2'>"; echo "<span class='head'><a href='questionview.php?qid=$row[question_id]' >$row[heading]</a> </span>"; echo "</span>"; echo "</h4>"; echo "$row[question_detail] <span class='view2'>Views : $row[views], Replies :$count</span>"; echo "<br/><br/>"; echo "Asked by<br/>$row[fullname]"; echo "<br/><div class='line'></div>"; } } else { echo "No questions at the moment"; } ?> <br><br> <center> <div class="pagination"> <a href="">«</a> <?php for ($i=1; $i <= 10; $i++) { echo '<a class="active" href="questions.php?page='.$i.'">'.$i.'</a>'; } ?> <a href="#">»</a> </div></center> <br> <?php require("footer.php")?>