It's probably because you've assigned $name1 and $date1 separate from
$subject, $lastposter, etc.
Try using a LEFT JOIN instead and see what happens.
On 10/30/06, Jason <[EMAIL PROTECTED]> wrote:
$query = $DB->query("SELECT name, date, regdate FROM users ORDER BY regdate
DESC LIMIT 10");
while ($info = $DB->fetch_row($query)){
$name1 = $info['name'];
$date1 = $info['date'];
$query = $DB->query("SELECT subject, lastposter, views, replies, lastpost
FROM thread ORDER BY lastpost DESC LIMIT 10");
while ($info1 = $DB->fetch_row($query)){
$ctoff = "35";
$subject = info1['subject'];
$lastposter = info1['lastposter'];
$views = info1['views'];
$replies = info1['replies'];
if (strlen($subject) > $ctoff) {
$subject = substr($subject,0,$ctoff);
$subject .= "...";
}
$content .= "
<tr>
<td class=\"sidedash\" align=\"left\" >$name1</td>
<td class=\"sidedash\" align=\"right\" >$date1</td>
<td class=\"sidedash\" align=\"left\" >$subject</td>
<td class=\"sidedash\" align=\"left\" >$lastposter</td>
<td class=\"sidedash\" align=\"right\" >$views</td>
<td class=\"sidedash\" align=\"right\" >$replies</td>
</tr>";
}
}
this is what i am getting with the results
Query one | Query two
---------------------------------
Fred 1/1/01 | thread4 Fred 2 2
Fred 1/1/01 | thread3 Fred 1 0
Fred 1/1/01 | thread2 Fred 5 1
Fred 1/1/01 | thread1 John 7 1