Repeat region with limits


i'm building list menu system using php database table called content , standard repeat region behavior. i've done many times before. "contentrs" table looks this:

 

 

idlinkclass
1page_01red
2page_02green
3page_03red
4page_04blue
5page_05green
6page_06red

 

i want generate list show list when class = red. hiding list when class not equal red easy. limiting list records class = red problem.

 

i've set following code:

<?php { ?>               <?php if ($row_contentrs['class'] == "red") {           echo "<li>" .$row_contentrs['class'] . "</li>";                     } ?>               <?php } while ($row_contentrs = mysql_fetch_assoc($row_contentrs)); ?> 

 

the first part works fine. repeat region, however, repeats of links end this: (as expected)

  • page_01
  • page_02
  • page_03
  • page_04
  • page_05
  • page_06

what want this:

  • page_01
  • page_03
  • page_06

 

i can modify contentrs editing query rs reveals records class of "red" modifying record set following statement:

 

select * content class = 'red' 

 

this solves problem, except have 90 different class variables , end bunch more. don't want have create different record set each. know how reuse repeat region. i'd figure way embed query statement repeat region command red class show in list, reuse statement each of different variables create drop down menu each class listed in menu bar.

 

if can figure out setting 90 classes simple copy , paste typing in new class value instead of creating 90+ record sets menu.

 

if has ideas i'd appreciate much. may barking wrong tree.

it looks i've stumped community. have ideas look?



More discussions in Develop server-side applications in Dreamweaver


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support