Hi.
The first query works perfectly fine, but the second query does not. The second query gives no errros but doesn't return any results.
any ideas?
$result = $db->sql("SELECT * FROM $table WHERE id = '$HTTP_GET_VARS[id]'");
while ($row = mysql_fetch_row($result)) {
$newsid = $row[0];
$author = $row[1];
$category = $row[9];
$result = $db->sql("SELECT topic FROM $table WHERE category = '$category' ORDER BY id DESC");
while ($row = mysql_fetch_row($result)) {
$related = $row[4];
}
the second query is suppose to get the $category from the first query and match it with the topic.