FT3 Posted January 24, 2012 Report Share Posted January 24, 2012 Sveiki. Man te tada lieta, man datubaze ir izveidotas 3 kategorijas un 3 forumi , bet izvada tikai vienu ! why ? <? include('connect.php'); $result = mysql_query("SELECT * FROM `rc_forum_category` ORDER BY `id` ", $connect) or die(mysql_error()); if(mysql_num_rows($result) == 0){echo 'forum DOWN !';} for ($i = 0; $i < mysql_num_rows($result); $i++) { $c_id = mysql_result($result, $i, "id"); $c_title = mysql_result($result, $i, "title"); $result = mysql_query("SELECT * FROM `rc_forum_forum` WHERE `category` = '$c_id'", $connect) or die(mysql_error()); for ($i = 0; $i < mysql_num_rows($result); $i++) { $f_id = mysql_result($result, $i, "id"); $f_title = mysql_result($result, $i, "title"); echo ' <b>'.$c_title.'</b><BR> '.$f_title.' '; } } ?> Quote Link to comment Share on other sites More sharing options...
aika Posted January 24, 2012 Report Share Posted January 24, 2012 nav labs stils $i pārrakstīt otrajā ciklā! :) Quote Link to comment Share on other sites More sharing options...
FT3 Posted January 24, 2012 Author Report Share Posted January 24, 2012 aika tnx tev ;] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.