i am stuck on a small problem, any help or suggestions more than appreciated, thank you. my users' main page is their profile page. on their profile page their comments are listed (all comments sent to this user show up here). these comments are in a comment table and the sql pulls info from there, etc. got it to this point.
my question is: how can i intertwine posts this user makes in with their comments? by posts, i mean items they post that they want to buy or sell, not posting comments. they post new items to buy or sell and that info is stored in the posting table in my db.
how can i make a do... while statement to list all comments to this user and all posts by this user in the same table and not have to keep them separate?
for example:
June 1st: 'hey, what's going on?' ---- comment table
May30th: New post to buy: Jeans ---- posting table
May29th: 'yea, i can do that, just let me know...' --- comment table
etc...
my current code for just the do... while for the comments table
<?php do { ?>
<tr>
<td width="20" valign="top" align="left"><img src="Images/conversationBubble.png" width="23" height="22" align="absmiddle" /></td>
<td valign="middle" width="470" align="left"><a href="OTHERuserlink.php?comment_id=<?php echo $row_getComment['comment_id']; ?>" class="link16"><?php echo $row_getComment['comment_username']; ?></a> <font size="-1">said</font> <?php echo $row_getComment['comment']; ?><br /><span class="font11Red"><?php echo $row_getComment['dateOFcomment']; ?></span></td>
</tr>
<?php } while ($row_getComment = mysql_fetch_assoc($getComment)); ?>
This post has been edited by ninethousandfeet@msn.com: 01 June 2009 - 10:14 PM

New Topic/Question
Reply




MultiQuote






|