I'm using two mysql tables for a commenting part of my website. one holds all the comments, the other holds all the users info. I need away for the comments table to be able to call on certain parts of the user table.
my current code is below:

<?php
$query_Recordset1 = "SELECT * FROM comments ORDER BY commentdate DESC";
$comments = mysql_query($query_Recordset1)or die(mysql_error());
$comment=mysql_fetch_assoc($comments);
$query_Recordset2 = "SELECT * FROM users ORDER BY userid";
$comments2 = mysql_query($query_Recordset2)or die(mysql_error());

do {
$comment2=mysql_fetch_assoc($comments2);
?>
<p><img src=<?=$comment2['userphoto']?> title="<?=$comment2['username']?> image" alt="<?=$comment2['username']?> image" style="height:40px;width:40px;"/><span class="username"><?=$comment2['username']?>:</span> </p>
<p><?=$comment['comment']?></p>
<p><span class="article">Written for <?=$comment['articleid']?></span></p>
<br/>
<?php } while ($comment = mysql_fetch_assoc($comments)); ?>

this code works exactly how I want it to other then that $comment2 needs to be set to the same row number as $comment['userid']

I'm sorry if this dosen't make sense but I've been fight with this for a few hours now and I'm not thinking straight anymore.
the comments table's userid holds the row number that the user information is on