I noticed a bug in my script and i have been searching a lot on internet since past few hours but i could not find any information or solution. The script runs fine, no errors, but the script does not fetch last row/entry. Example, if there are 3 rows in the table, my script only pulls 2 rows. If there are 10, then only 9 are fetched. Please help me find the bug.
Here is my script...
<?php
$query = "SELECT * FROM members WHERE $condition_res ORDER BY id DESC LIMIT $startpoint, $limit";
$result_query = mysqli_query($mysqli, $query);
while($row = @mysqli_fetch_assoc($result_query)) {
$mid=$row["id"];
$member=$row["name"];
$gender= $row["gender"];
?>
<tr>
<td><?php echo $mid; ?></td>
<td><?php echo $member; ?></td>
<td><?php echo $gender; ?></td>
</tr>
<?php } ?>
Note: $startpoint and $limit variables are for Pagination. $condition_res is for search criteria.