Jump to content

Please help, Collect JOIN DATA


Baseball

Recommended Posts

1zvc00k.jpg

 

code:

 

$sql2 = "SELECT f.id AS fid, f.name, f.desc, f.lpname,
f.lpid,f.num_topics,f.num_replies, c.id as cid,c.position as cat_position, c.cat_name,
mr.icon
            FROM (forum_sub_cats f, forum_cats c)
              LEFT JOIN users mr ON (mr.id=f.lpid) WHERE c.id=cid";
					$res2 = mysql_query($sql2) or die(mysql_error());

while($row3 = mysql_fetch_assoc($res2)){	
					echo $row3['num_topics'];
					$posts = $row3['num_topics'] + $row3['num_replies'];
if ($row3['cid'] != $cur_category)	// A new category since last iteration?
{
	if ($cur_category != 0)
		echo "\t\t\t".'</tbody>'."\n\t\t\t".'</table>'."\n\t\t".'</div>'."\n\t".'</div>'."\n".'</div>'."\n\n";

	++$cat_count;

echo "<Fieldset><legend>{$row3['cat_name']} -> $posts</legend></fieldset>";
$cur_category = $row3['cid'];
}


						echo "	<a href=\".?act=forum&fid=".$row3['fid']."\">".$row3['name']."</a><br>\n";
						echo "	" . $row3['desc'] . "\n Posts: ";
						echo "	</div>";

 

Thanks fellas.

 

Link to comment
Share on other sites

You might wanna explain your problem as we are programmers not telepaths. If you want to receive help you need to help us. This means a clear explanation of the problem and properly indented code not some junk that might turn out to contain keywords of a certain programming language.

 

The main reason you can't debug this yourself is because you can't read it anymore yourself.

Link to comment
Share on other sites

You might wanna explain your problem as we are programmers not telepaths. If you want to receive help you need to help us. This means a clear explanation of the problem and properly indented code not some junk that might turn out to contain keywords of a certain programming language.

 

The main reason you can't debug this your

 

self is because you can't read it anymore yourself.

 

That's why I Ask u for help :-)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.