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
https://forums.phpfreaks.com/topic/186370-please-help-collect-join-data/
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.

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 :-)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.