i posted this in the mysql forums but i think this is more php related...
anyway...i have a problem, its currently only displaying the first comment, not all of them (if i take away the desc, it shows the latest post) but not all of them. I cannot figure out whats wrong, could anyone offer any suggestions?
$match=false;
$mysql_access=mysql_connect("xxx", "xxx", "xxx");
mysql_select_db("xxx");
$query3 = "SELECT postid, replyid, name, comment, date FROM thought_reply order by date desc";
$result = mysql_query($query3) or die("Query failed : " . mysql_error());
while($row=mysql_fetch_row($result))
{
if($postid==$row[0])
{
$match=true;
$name=$row[2];
$comment=$row[3];
$date=$row[4];
}
}
print "<table>\n";
if($match)
{
print "<tr>";
print "<td><b>$name</b></td>";
print "<td> </td>";
print "</tr>";
print "<tr>";
print "<td colspan='2'>$comment</td>";
print "</tr>";
}
else
{
print "<P>There are no comments associated with that post";
}
print "</table>\n";