Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8061017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:11:20+00:00 2026-06-05T10:11:20+00:00

Hi I am trying to set up spry tabbed panels with dynamic data, i

  • 0

Hi I am trying to set up spry tabbed panels with dynamic data, i want to use single query to do this job, i am getting results only in “Tab 1” , “Tab 2”, “Tab 3” does not show any data, i think i am using while loop in repating region three times with same query, that is why this is happening, i tried with foreach loop but no help, this is my testing code so far, please suggest what is the correct way to do this.

Thanks.

my spry tabbed panel code are like this.

<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Tab 1</li>
<li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
<li class="TabbedPanelsTab" tabindex="0">Tab 3</li>
</ul>
<div class="TabbedPanelsContentGroup">

<div class="TabbedPanelsContent">
<?php while ($list = mysql_fetch_assoc($queryresult)): ?>
<div class="category-main-container">
<div class="category-main-desc"> <?php echo $list['title'];?></a>
</div><!--end of category-desc-->
</div><!--end of category-container-->
<?php endwhile;?>
</div>

<div class="TabbedPanelsContent">
<?php while ($list = mysql_fetch_assoc($queryresult)): ?>
<div class="category-main-container">
<div class="category-main-desc"> <?php echo $list['id'];?></a>
</div><!--end of category-desc-->
</div><!--end of category-container-->
<?php endwhile;?>
</div>

<div class="TabbedPanelsContent">
<?php while ($list = mysql_fetch_assoc($queryresult)): ?>
<div class="category-main-container">
<div class="category-main-desc"> <?php echo $list['rating'];?></a>
</div><!--end of category-desc-->
</div><!--end of category-container-->
<?php endwhile;?>
</div>

</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>

and php query is like this.

$offset = ($currentpage - 1) * $rowsperpage;
$sqlquery = "SELECT * FROM $tablename ORDER BY $orderby $sortby LIMIT $rowsperpage OFFSET $offset";
$queryresult = mysql_query($sqlquery, $connection) or trigger_error("SQL", E_USER_ERROR);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:11:22+00:00Added an answer on June 5, 2026 at 10:11 am

    Simpler way to do this is by using separate MySQL query for each tab, like this

    $sqlquery1 = "SELECT id FROM table_name ORDER BY id ASC";
    $queryresult1 = mysql_query($sqlquery1, $connection) or trigger_error("SQL", E_USER_ERROR);
    $sqlquery2 = "SELECT title FROM table_name ORDER BY id ASC";
    $queryresult2 = mysql_query($sqlquery2, $connection) or trigger_error("SQL", E_USER_ERROR);
    $sqlquery3 = "SELECT rating FROM table_name ORDER BY id ASC";
    $queryresult3 = mysql_query($sqlquery3, $connection) or trigger_error("SQL", E_USER_ERROR);
    

    and in tabbed menu do like this.

    <div class="TabbedPanelsContent">
    <?php while ($list = mysql_fetch_assoc($queryresult1)): ?>
    <div class="category-main-container">
    <div class="category-main-desc"> <?php echo $list['id'];?></a>
    </div><!--end of category-desc-->
    </div><!--end of category-container-->
    <?php endwhile;?>
    </div>
    
    <div class="TabbedPanelsContent">
    <?php while ($list = mysql_fetch_assoc($queryresult2)): ?>
    <div class="category-main-container">
    <div class="category-main-desc"> <?php echo $list['title'];?></a>
    </div><!--end of category-desc-->
    </div><!--end of category-container-->
    <?php endwhile;?>
    </div>  
    
    <div class="TabbedPanelsContent">
    <?php while ($list = mysql_fetch_assoc($queryresult3)): ?>
    <div class="category-main-container">
    <div class="category-main-desc"> <?php echo $list['rating'];?></a>
    </div><!--end of category-desc-->
    </div><!--end of category-container-->
    <?php endwhile;?>
    </div>
    

    this should fix your problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to set port forwarding using c#, but I keep getting this error
Im trying set the single table inheritance model type in a form. So i
Trying to set this label to red I've got the following class: .redErrorText {
Trying to set up the svn commit with trac using this script. It is
I'm trying set cookies for dynamic features. I've been able to get the on
Trying to set up a new spring project and im having this issue where
Im trying to set reminders, and im stuck with this error BNS Error: The
Im trying to set up a log-in and password page for my site. This
Trying to set this textbox <%= Html.TextBoxFor(m => m.IndicationCalculatorNewGroupName, new {propertyName = IndicationCalculatorNewGroupName, onchange
Trying to set cache response headers on a dynamically-generated image, I'm getting a weird

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.