I've been requesting MySQL results and looping through them like this:
$query = "SELECT * FROM $table";
$result = mysql_query($query);
for($i = 0; $i < mysql_num_rows($result); $i++){
echo mysql_result($result, $i, $row);
//do something else;
}
you can probably see what happens. What if a row has been deleted? What if the first item is gone? In that case, there could be 30 items in the list, but the last items index is at position 50. How do I fix this or what other systems can I use?