cheeseus Posted February 22, 2008 Share Posted February 22, 2008 Hi everyone, I am trying to install a tabbed panels section on my site where I can display news from different categories, i.e. first query the DB and take out the different categories and write them as the TAB names. Then, with another query, display news from the corresponding category in the corresponding tab. But all I get is the categories and then the news from only one category. Here's the code: <div id="TabbedPanels2" class="VTabbedPanels"> <ul class="TabbedPanelsTabGroup"> <?php $section_query = mysql_query("SELECT * FROM az_sections ORDER BY section_id ASC",$connect); while($row = mysql_fetch_array($section_query)) { echo "<li class='About' tabindex='0'>".$row['section']."</li>"; } ?> </ul> <div class="AboutContentGroup"> <?php $article_query = mysql_query("SELECT * FROM az_articles WHERE issue = 'February 2008' ORDER BY art_id ASC",$connect); while($arow = mysql_fetch_array($article_query)) { echo "<div class='ContentAbout'>".$arow['art_title']." ".$arow['section']."</div>"; } ?> </div> </div> Can anyone help? 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.