Are you using $related_stories to output all the stories?
If you are, the problem is each time it loops, it overwrites the previous $related_stories.
You should do this instead:
<?php
$related = $db->sql("SELECT * FROM $table WHERE category = '$content' ORDER BY id ASC LIMIT 6");
while ($row = mysql_fetch_array($related)) {
$id = $row[0];
$time = $row[3];
$topic = $row[4];
$date = date("m/d/Y", $time);
$related_stories[] = "<b>»</b> <a href=\"/view.php?id=$id\">$topic</a> - $date<br/>";
}
?>
And then you can use a for () loop to output each story.