Nested Repeat Region (How to convert from table to list)

Sorry, i am really no PHP hero :-(
i created a menu with the "nested repeat region" wizzard. Now i want to change the HTML from TABLE to LIST.
I thought i just need to delete <table>- and <td>-tags, replace <tr> with <ul> and that's it. (But ist's NOT!)
This is my code:
------- START ----------------
<ul id="nav">
      <?php do { ?>      
          <li><?php echo $row_master1waa_page_top['top_name']; ?></li>
        <?php
  if ($totalRows_master1waa_page_top>0) {
    $nested_query_detail2waa_page_sub = str_replace("123456789", $row_master1waa_page_top['id_top'], $query_detail2waa_page_sub);
    mysql_select_db($database_WAA);
    $detail2waa_page_sub = mysql_query($nested_query_detail2waa_page_sub, $WAA) or die(mysql_error());
    $row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub);
    $totalRows_detail2waa_page_sub = mysql_num_rows($detail2waa_page_sub);
    $nested_sw = false;
    if (isset($row_detail2waa_page_sub) && is_array($row_detail2waa_page_sub)) {
      do { //Nested repeat
?>
          <ul>
            <li>  <?php echo $row_detail2waa_page_sub['sub_head']; ?></li>
          </ul>
          <?php
      } while ($row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub)); //Nested move next
?>
        <?php } while ($row_master1waa_page_top = mysql_fetch_assoc($master1waa_page_top)); ?>
</ul>  
------- END -----
The problem is located in line 3. the result is a list like this:
<ul id="nav">
     <li>xxx</li>
     <li>xxx</li>
          <ul>
                <li>xxx</li>
                <li>xxx</li>
          </ul>
     <li>xxx</li>
</ul>
Of course it will not work. I need the nested list inserted like this:
<ul id="nav">
     <li>xxx</li>
     <li>xxx
          <ul>
                <li>xxx</li>
                <li>xxx</li>
          </ul>
      </li>
     <li>xxx</li>
</ul>
Can someone please help me changing my code to get this result?

Hi,
I had trouble replying. I may be of some assistance until one of the Guru's get on.
The whole thing works on loops based inside do and while
EX.
<?php
          do{    //end php, use html
?>
I can repeat anthing here in HTML!
<?php } while ( /* some critera exist ex: i<5 */      ); ?>
so, your 'options' tag or LI' tags should only exist inside the first loop, check your { }
The entire LIST  would repeat if you add the UL tags inside the nested loop area
You may find it easier to reaplace the table with div tags and then indent the sub or nested loop with a class
I don't have time to test this but try this:
<ul id="nav">
<ul>
<?php do { ?>      
  <li><?php echo $row_master1waa_page_top['top_name']; ?></li>
<?php
  if ($totalRows_master1waa_page_top>0) {
    $nested_query_detail2waa_page_sub = str_replace("123456789", $row_master1waa_page_top['id_top'], $query_detail2waa_page_sub);
    mysql_select_db($database_WAA);
    $detail2waa_page_sub = mysql_query($nested_query_detail2waa_page_sub, $WAA) or die(mysql_error());
    $row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub);
    $totalRows_detail2waa_page_sub = mysql_num_rows($detail2waa_page_sub);
    $nested_sw = false;
    if (isset($row_detail2waa_page_sub) && is_array($row_detail2waa_page_sub)) { ?>
   <ul>
  <?php  do { //Nested repeat ?>   
               <li>  <?php echo $row_detail2waa_page_sub['sub_head']; ?></li>
        <?php } while ($row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub)); //Nested move next ?>
    </ul>
<?php 
?>
        <?php } while ($row_master1waa_page_top = mysql_fetch_assoc($master1waa_page_top)); ?>
</ul>
Hit me back if its close but wonky..
J

Similar Messages

  • Nested Repeat Regions

    I've got a page where I need nested repeat regions using the
    same data.
    Basically, list people who have donated money in groupings by
    level:
    $100-$199
    Murray
    Nadia
    Thierry
    $200-$299
    Dan
    Dan
    Patty
    I'm looking at Tom Muck's "Simulated Nested Region" extension
    so I can do
    this using one Recordset (seems silly to set up a recordset
    for each
    donation level) but the only problem is it looks like the
    donation levels
    have to sort in order to work, and they don't.
    Anyone know of any other extensions or easy ways to make this
    work?
    Oh yeah.....MySQL and PHP.
    Thanks!
    Mad Dog

    SmellyPete wrote:
    > I've got a problem with nested templates in my site. I
    don't think it's an
    > error or bug as such, just a really strange limitation,
    that I hope there is a
    > work around for.
    >
    > I've setup a menubar with a repeating table region in a
    template. Then I laid
    > out the content (editable) regions in a nested template.
    The system works
    > really well in dreamweaver, if you want to add a menu
    item, you do so to the
    > parent template, and then it filters through out the
    site.
    >
    > The problem is that when I try to edit the pages as a
    client with contribute
    > (even as an administrator) it will not allow access to
    edit a .dwt file, even
    > if it has editable regions in it. This means I can't use
    contribute to add an
    > item to the menubar, because I need to be able to edit
    the nested template. I'm
    > sure it's possible, because a .dwt is just an .htm file
    with a different hat on.
    >
    > There must be some way of doing this. As soon as I read
    about the template
    > system I immediately thought this would be one of it's
    strengths, and would be
    > very surprised if the contribute user were limited to
    making changes on every
    > individual page.
    >
    > PS. I'm sure someone will suggest that I just move the
    repeating region into
    > the nested template. I could do this, but the whole
    point is that with one
    > change I want it to will filter down through the whole
    site. I thought maybe
    > SSI might be the answer, but would that just confuse
    contribute even more?
    >
    It seems to me the whole point of using Contribute is to keep
    users from
    changing basic site configurations such as the menu. Use
    Dreamweaver or
    one of the simple HTML editors around.

  • URGENTLY NEED HELP WITH NESTED REPEAT REGION

    Im using dreamweaver to deevelop a page that displays questions in ann assessment to the user. First of all the page shows the assessment name to the user and then it gets some information about the questions in the assessment from the table called Item. It gets the Question_ID and then there is a repeat region which uses the Question_ID to display the questions in the assessment. There is a nested repeat region inside this which displays the possible answers the user can respond to the question with It gets this information from a table called outcome. The page should display each question and then all the possible answers but i am having problems and im not sure wether i am doing this in the correct way. What is wrong with my code? PLEASE HELP! can someone tell me what is going wrong and how i can fix this problem thamks.
    here is my code.
    Driver DriverassessmentRecordset = (Driver)Class.forName(MM_connAssessment_DRIVER).newInstance();
    Connection ConnassessmentRecordset = DriverManager.getConnection(MM_connAssessment_STRING,MM_connAssessment_USERNAME,MM_connAssessment_PASSWORD);
    PreparedStatement StatementassessmentRecordset = ConnassessmentRecordset.prepareStatement("SELECT Assessment_ID, Assessment_Name, Time_Limit, Display_Random, Record_Answers FROM Assessment.assessment WHERE Assessment_ID = '" + session.getValue("AssessmentID") + "' ");
    ResultSet assessmentRecordset = StatementassessmentRecordset.executeQuery();
    boolean assessmentRecordset_isEmpty = !assessmentRecordset.next();
    boolean assessmentRecordset_hasData = !assessmentRecordset_isEmpty;
    Object assessmentRecordset_data;
    int assessmentRecordset_numRows = 0;
    %>
    <%
    Driver DriveritemRecordset = (Driver)Class.forName(MM_connAssessment_DRIVER).newInstance();
    Connection ConnitemRecordset = DriverManager.getConnection(MM_connAssessment_STRING,MM_connAssessment_USERNAME,MM_connAssessment_PASSWORD);
    PreparedStatement StatementitemRecordset = ConnitemRecordset.prepareStatement("SELECT Question_ID, Assessment_ID FROM Assessment.item WHERE Assessment_ID = '" + session.getValue("AssessmentID") + "' ");
    ResultSet itemRecordset = StatementitemRecordset.executeQuery();
    boolean itemRecordset_isEmpty = !itemRecordset.next();
    boolean itemRecordset_hasData = !itemRecordset_isEmpty;
    Object itemRecordset_data;
    int itemRecordset_numRows = 0;
    %>
    <%
    Driver DriverquestionRecordset = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
    Connection ConnquestionRecordset = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
    //PreparedStatement StatementquestionRecordset = ConnquestionRecordset.prepareStatement("SELECT Question_Type, Number_Outcomes, Question_Wording FROM Answer.question WHERE Question_ID = '" + (((itemRecordset_data = itemRecordset.getObject("Question_ID"))==null || itemRecordset.wasNull())?"":itemRecordset_data) +"' ");
    //ResultSet questionRecordset = StatementquestionRecordset.executeQuery();
    %>
    <%
    Driver DriveroutcomeRecordset = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
    Connection ConnoutcomeRecordset = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
    PreparedStatement StatementoutcomeRecordset = ConnoutcomeRecordset.prepareStatement("SELECT Outcome_Number, Outcome_Text, Score, Feedback FROM Answer.outcome WHERE Question_ID = '" +itemRecordset.getObject("Question_ID")+ "' ");
                     ResultSet outcomeRecordset = StatementoutcomeRecordset.executeQuery();
                     boolean outcomeRecordset_isEmpty = !outcomeRecordset.next();
                    boolean outcomeRecordset_hasData = !outcomeRecordset_isEmpty;Object outcomeRecordset_data;
                  int outcomeRecordset_numRows = 0;
    %>
    <%
    int Repeat1__numRows = -1;
    int Repeat1__index = 0;
    itemRecordset_numRows += Repeat1__numRows;
    %>
    <%
    int Repeat2__numRows = -1;
    int Repeat2__index = 0;
    assessmentRecordset_numRows += Repeat2__numRows;
    %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/assessment.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
    <head>
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Assessment</title>
    <!-- InstanceEndEditable -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <table width="1000" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td height="190"><img src="../img/assessment_login.png" alt="" name="navigation" width="1000" height="190" border="0" id="navigation" /></td>
      </tr>
      <tr>
        <td height="19"><!--DWLayoutEmptyCell--> </td>
      </tr>
      <tr>
        <td height="19"><!-- InstanceBeginEditable name="main" -->
        <table>
          <tr>
            <td width="990">Assessment Name:<%=(((assessmentRecordset_data = assessmentRecordset.getObject("Assessment_Name"))==null || assessmentRecordset.wasNull())?"":assessmentRecordset_data)%> </td>
            </tr>
          <tr>
            <td><% int count = 1; %> </td>
          </tr>
          <tr>
            <td valign="top"><table>
                <% while ((itemRecordset_hasData)&&(Repeat1__numRows-- != 0)) { %>
    <tr>
                  <td width="21"> 
                     </td>
                  <td width="86">Question:<%= count %></td>
                </tr>
                <tr>
                  <td></td>
                  <td>
                     <% 
                     PreparedStatement StatementquestionRecordset = ConnquestionRecordset.prepareStatement("SELECT Question_Type, Number_Outcomes, Question_Wording FROM Answer.question WHERE Question_ID = '" +itemRecordset.getObject("Question_ID")+"' ");
                     ResultSet questionRecordset = StatementquestionRecordset.executeQuery();
                  boolean questionRecordset_isEmpty = !questionRecordset.next();
                  boolean questionRecordset_hasData = !questionRecordset_isEmpty;
                  Object questionRecordset_data;
                  int questionRecordset_numRows = 0;
                     %> <%= questionRecordset.getObject("Question_Wording") %></td>
                </tr>
                <tr>
                  <td></td>
                  <td>
                     </td>
                </tr>
                <tr>
                  <td></td>
                  <td> 
                    <table>
                      <% while ((outcomeRecordset_hasData)&&(Repeat2__numRows-- != 0)) {%>
                      <tr>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                      </tr>
                      <%
      Repeat2__index++;
      outcomeRecordset_hasData = outcomeRecordset.next();
    %>
                    </table>
                    <table>
                      <tr> </tr>
                      <tr> </tr>
                    </table></td>
                </tr>
                <%
      Repeat1__index++;
      itemRecordset_hasData = itemRecordset.next();
      count++;
    //questionRecordset.close();
    //StatementquestionRecordset.close();
    //ConnquestionRecordset.close();
    %>
    Here is the exception i am gettingorg.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 115 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:220: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 116 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:223: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 117 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:226: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 118 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:229: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java:232: cannot find symbol
    symbol : variable outcomeRecordsetRecordset_data
    location: class org.apache.jsp.delivery.session_jsp
    out.print((((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data));
    ^
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    Note: C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java uses or overrides a deprecated API.
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    Note: Recompile with -Xlint:deprecation for details.
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    Note: C:\Servers\Tomcat 5.0\work\Catalina\localhost\assessment\org\apache\jsp\delivery\session_jsp.java uses unchecked or unsafe operations.
    An error occurred at line: 119 in the jsp file: /delivery/session.jsp
    Generated servlet error:
    Note: Recompile with -Xlint:unchecked for details.
    5 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    Hi,
    Dont have much time to go through your code, but apparently i can see the error is becoz of the following reason.
    In the following code, you have used "outcomeRecordset_data ", but its not declared. You need to declare the variable first before you can use it.
    <% while ((outcomeRecordset_hasData)&&(Repeat2__numRows-- != 0)) {%>
                      <tr>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Number"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Outcome_Text"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Score"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Feedback"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                        <td><%=(((outcomeRecordset_data = outcomeRecordset.getObject("Question_ID"))==null || outcomeRecordset.wasNull())?"":outcomeRecordsetRecordset_data)%></td>
                      </tr>
                      <%
      Repeat2__index++;
      outcomeRecordset_hasData = outcomeRecordset.next();
    %>Try declaring the "outcomeRecordset_data " on top as an object
    Hope it helps

  • Nested Repeat Regions in Dreamweaver 8

    I am waying the option of upgrading from MX to 8 or just
    getting MX Looper to do nested repeat regions. Any advice? Are
    nested repeat regions built into Dreamweaver 8?

    SmellyPete wrote:
    > I've got a problem with nested templates in my site. I
    don't think it's an
    > error or bug as such, just a really strange limitation,
    that I hope there is a
    > work around for.
    >
    > I've setup a menubar with a repeating table region in a
    template. Then I laid
    > out the content (editable) regions in a nested template.
    The system works
    > really well in dreamweaver, if you want to add a menu
    item, you do so to the
    > parent template, and then it filters through out the
    site.
    >
    > The problem is that when I try to edit the pages as a
    client with contribute
    > (even as an administrator) it will not allow access to
    edit a .dwt file, even
    > if it has editable regions in it. This means I can't use
    contribute to add an
    > item to the menubar, because I need to be able to edit
    the nested template. I'm
    > sure it's possible, because a .dwt is just an .htm file
    with a different hat on.
    >
    > There must be some way of doing this. As soon as I read
    about the template
    > system I immediately thought this would be one of it's
    strengths, and would be
    > very surprised if the contribute user were limited to
    making changes on every
    > individual page.
    >
    > PS. I'm sure someone will suggest that I just move the
    repeating region into
    > the nested template. I could do this, but the whole
    point is that with one
    > change I want it to will filter down through the whole
    site. I thought maybe
    > SSI might be the answer, but would that just confuse
    contribute even more?
    >
    It seems to me the whole point of using Contribute is to keep
    users from
    changing basic site configurations such as the menu. Use
    Dreamweaver or
    one of the simple HTML editors around.

  • Nested Repeat Region

    Dreamweaver CS3
    ASP / VBScript
    Hi,
    I'm trying to create a nested repeat region to display a list
    of categories
    and, in brackets afterwards, a count of the number of
    sub-categories
    contained in it E.g.
    Cats (12)
    Dogs (43)
    Fish (92)
    Etc
    I have managed to create my repeat region ok because as soon
    as I drop a
    field in from the recordset, it loops through them all and
    displays them
    correctly. However, when I try and simply write out the total
    number of
    records found, it doesn't display anything.
    Recordset 1 is a straighforward select from the table.
    Recordset 2 adds a
    WHERE clause usinga variable based on the 1st recordset. Here
    is the code
    i'm using for the 2 recordsets:
    Recordset 1 :
    <%
    Dim Level1
    Dim Level1_cmd
    Dim Level1_numRows
    Set Level1_cmd = Server.CreateObject ("ADODB.Command")
    Level1_cmd.ActiveConnection = MM_SemiDirectory_STRING
    Level1_cmd.CommandText = "SELECT * FROM TBL_Level1 ORDER BY
    [Description]
    ASC"
    Level1_cmd.Prepared = true
    Set Level1 = Level1_cmd.Execute
    Level1_numRows = 0
    %>
    Recordset 2 :
    <%
    Dim Level2__varLink
    Level2__varLink = "1"
    If (level1.fields.item("Level1_ID").value <> "") Then
    Level2__varLink = level1.fields.item("Level1_ID").value
    End If
    %>
    <%
    Dim Level2
    Dim Level2_cmd
    Dim Level2_numRows
    Set Level2_cmd = Server.CreateObject ("ADODB.Command")
    Level2_cmd.ActiveConnection = MM_SemiDirectory_STRING
    Level2_cmd.CommandText = "SELECT * FROM TBL_Level2 WHERE
    Level1_ID = ? ORDER
    BY Level1_ID ASC"
    Level2_cmd.Prepared = true
    Level2_cmd.Parameters.Append
    Level2_cmd.CreateParameter("param1", 5, 1, -1,
    Level2__varLink) ' adDouble
    Set Level2 = Level2_cmd.Execute
    Level2_numRows = 0
    %>
    Now for the repeated code :
    <%
    While ((Repeat1__numRows <> 0) AND (NOT Level1.EOF))
    %>
    <li><a
    href="category.asp?level1=<%=(Level1.Fields.Item("Level1_ID").Value)%>"><%=(Level1.Fields .Item("Description").Value)%>
    (<%=(Level2_total)%>)
    </li></a>
    <%
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    Level1.MoveNext()
    Wend
    %>
    Can anyone tell me what I need to do to this code to make it
    display the
    number of sub-categories?
    Thanks!!!

    Ok folks,
    I found a way to get what I want. It's not pretty as I had to
    make an extra
    query in the database (that select of the count of all child
    table results
    for each parent category) and am pulling from that but it
    works and that's
    the main thing. I'm sure there is a more effective way of
    doing it but
    that's life!
    I'm still interested in knowing the 'proper' way (if there is
    such a thing)
    so if you have the time to show me, i'm all ears!
    Cheers!
    "Mintyman" <[email protected]> wrote in message
    news:[email protected]...
    > Ok,
    >
    > So I closed the <li> code before the <a>
    code. D'oh!
    >
    > Anyway, it returns a number now........the problem now
    is that it returns
    > the same value for each parent repeat!!!
    >
    > "Mintyman" <[email protected]> wrote in message
    > news:[email protected]...
    >> Dreamweaver CS3
    >> ASP / VBScript
    >>
    >> Hi,
    >>
    >> I'm trying to create a nested repeat region to
    display a list of
    >> categories and, in brackets afterwards, a count of
    the number of
    >> sub-categories contained in it E.g.
    >>
    >> Cats (12)
    >> Dogs (43)
    >> Fish (92)
    >> Etc
    >>
    >> I have managed to create my repeat region ok because
    as soon as I drop a
    >> field in from the recordset, it loops through them
    all and displays them
    >> correctly. However, when I try and simply write out
    the total number of
    >> records found, it doesn't display anything.
    >>
    >> Recordset 1 is a straighforward select from the
    table. Recordset 2 adds a
    >> WHERE clause usinga variable based on the 1st
    recordset. Here is the
    >> code i'm using for the 2 recordsets:
    >>
    >> Recordset 1 :
    >>
    >> <%
    >> Dim Level1
    >> Dim Level1_cmd
    >> Dim Level1_numRows
    >>
    >> Set Level1_cmd = Server.CreateObject
    ("ADODB.Command")
    >> Level1_cmd.ActiveConnection =
    MM_SemiDirectory_STRING
    >> Level1_cmd.CommandText = "SELECT * FROM TBL_Level1
    ORDER BY [Description]
    >> ASC"
    >> Level1_cmd.Prepared = true
    >>
    >> Set Level1 = Level1_cmd.Execute
    >> Level1_numRows = 0
    >> %>
    >>
    >> Recordset 2 :
    >>
    >> <%
    >> Dim Level2__varLink
    >> Level2__varLink = "1"
    >> If (level1.fields.item("Level1_ID").value <>
    "") Then
    >> Level2__varLink =
    level1.fields.item("Level1_ID").value
    >> End If
    >> %>
    >> <%
    >> Dim Level2
    >> Dim Level2_cmd
    >> Dim Level2_numRows
    >>
    >> Set Level2_cmd = Server.CreateObject
    ("ADODB.Command")
    >> Level2_cmd.ActiveConnection =
    MM_SemiDirectory_STRING
    >> Level2_cmd.CommandText = "SELECT * FROM TBL_Level2
    WHERE Level1_ID = ?
    >> ORDER BY Level1_ID ASC"
    >> Level2_cmd.Prepared = true
    >> Level2_cmd.Parameters.Append
    Level2_cmd.CreateParameter("param1", 5,
    >> 1, -1, Level2__varLink) ' adDouble
    >>
    >> Set Level2 = Level2_cmd.Execute
    >> Level2_numRows = 0
    >> %>
    >>
    >>
    >> Now for the repeated code :
    >>
    >>
    >> <%
    >> While ((Repeat1__numRows <> 0) AND (NOT
    Level1.EOF))
    >> %>
    >> <li><a
    >>
    href="category.asp?level1=<%=(Level1.Fields.Item("Level1_ID").Value)%>"><%=(Level1.Fields .Item("Description").Value)%>
    >> (<%=(Level2_total)%>)
    >> </li></a>
    >>
    >>
    >> <%
    >> Repeat1__index=Repeat1__index+1
    >> Repeat1__numRows=Repeat1__numRows-1
    >> Level1.MoveNext()
    >> Wend
    >> %>
    >>
    >> Can anyone tell me what I need to do to this code to
    make it display the
    >> number of sub-categories?
    >>
    >> Thanks!!!
    >>
    >>
    >>
    >
    >

  • Nested Repeat region error

    I am trying to create a simple nested repeat region and I get a mismatch error. I ran a SQL trace and it seems to not be passing the key from the master table , but rather @p1 in its place. any ideas?

    I am trying to create a simple nested repeat region and I get a mismatch error. I ran a SQL trace and it seems to not be passing the key from the master table , but rather @p1 in its place. any ideas?

  • Limit records in nested repeat region

    I am using the nested repeat region behaviour and I need to limit the amount of records in the detail table.
    in ADDT it guides you through a wizard for master and detail tables to use this nesting which works great but it also returns all the records in the detail. I would like to limit the amount.
    I tried modifying the query by adding
    $maxRows_detail4tbl_products = 4;
    $pageNum_detail4tbl_products = 0;
    if (isset($_GET['pageNum_detail4tbl_products'])) {
      $pageNum_detail4tbl_products = $_GET['pageNum_detail4tbl_products'];
    $startRow_detail4tbl_products = $pageNum_detail4tbl_products * $maxRows_detail4tbl_products;
    still returns all rows. any help is greatly appreciated.

    In the Application Panel,  select the tab Biddings
    dbclick  Recordset Detail. Click the Advanced  button, in the last SQL command ORDER BY
    You add LIMIT 0,4

  • 3 level nested repeat region?

    hi all,
    I tried to follow the ADDT tutorial related to creatìng 3 level nested
    repeat region.
    All is ok and I can list all continend, countries and cities.
    But, how can I show only continent and countries that have cities set and
    hide all those continents and countries that do not contains any city?
    Example:
    EUROPE
    France
    Paris
    Spain
    Madrid
    ITALY
    Germany
    Monaco
    In this example, how can I hide the ITALY country? Or how can I hide entire
    continent/countries with no city set yet?
    TIA
    tony

    Ciao Tony,
    you´ll most probably just need to add the IS NOT NULL comparison function to the query´s WHERE clause, example:
    WHERE city IS NOT NULL
    http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Nested repeat Region - run time var PHP

    I have tried several attempts at creating a nested region
    with no luck of sucess
    sql & PHP
    There are 2 record sets
    rsProduct and
    rsCourse
    rsProduct
    SELECT *
    FROM svProductList
    WHERE svProductList.productOrder
    ORDER BY productOrder ASC
    rsCourse
    SELECT *
    FROM trainingCourseTBL
    WHERE trainingCourseTBL.product = colname
    ORDER BY trainingCourseTBL.courseOrder ASC
    colname
    type numeric
    default value -1
    runtim value $row_rsProduct['productOrder']
    Start repeat region 1
    rsProduct.productName
    Start repeat region 2
    rsCourse.course
    END repeat region 2
    END Start repeat region 1
    I would like to set up a run time var for the rsCourse where
    I get the value from the first repeat regions productID
    Can someone point me towards the right direction?

    On 21 May 2007 in macromedia.dreamweaver.appdev, cdembek
    wrote:
    > Can someone point me towards the right direction?
    I don't have time for a long explanation right now, but do a
    web search
    for 'Nested Repeat Region'.
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • How to convert internal table data to PDF format

    HI,
         I have an internal table data having one field with 255 chars. length.I want to send that intenal table data as attachemnt with external mail. i am thinking of converting that data into PDF format and use the FM to send the mail. How to convert internal table data to PDF format.
    Kishore

    In which format is your data in the internal table currently. Is it returned by a smartform/script or its just data fetched from some database table into an internal table. Since its obvious that the data should appear in the PDF with some Layout, you should be using smartform to format the data properly. See the Link
    Smartform to PDF to EMAIL
    This shows convertion of smartform to pdf and send it through email
    Regards,
    Abhishek

  • How to convert Internal Table to Cluster Table ?

    How to convert Internal Table to Cluster Table ?

    Use  :
    EXPORT itab TO DATABASE dbtab(ar) ID key.
    <i>EXPORT obj1 ... objn TO DATABASE dbtab(ar) ID key.
    Additions:
    1. ... = f (for each field you want to export)
    2. ... FROM f (for each field you want to export)
    3. ... CLIENT g before ID key )
    4. ... USING form
    5. ... FROM wa (as last addition or after dbtab(ar))
    In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Implicit field names not allowed with clusters and Table work areas not allowed.
    Effect
    Stores a data cluster in database table dbtab. The specified objects obj1 ... objn (fields, structures, or tables) are stored as a single cluster in the database table dbtab.
    The specified database table dbtab must have a standard structure.
    The database table dbtab is divided into various logically-related sections (ar, two-character name).
    You can export a collection of data objects (a data cluster) to a part of the database using a key (field key).
    You can import individual data objects from this collection using the IMPORT statement.
    Notes
    In classes, you must always assign explicit names to the data objects you want to export, that is, you must use either addition 1 or addition 2.
    In classes, you must always specify the work area explicitly, that is, addition 5 is obligatory.
    The table dbtab that appears after DATABAE must be declared under TABLES (except in addition 5).
    You cannot export the header lines of internal tables. If you specify the name of an internal table with header line, the system always exports the body of the table.
    You cannot export data, object, or interface references.
    The data is stored in the database, and is consequently not actually stored until a database commit occurs (see LUW). Until this point, you can undo all of your changes using a database rollback (see Programming Transactions).
    Example
    Exporting two fields and an internal table to the database table INDX:
    TABLES INDX.
    TYPES: BEGIN OF ITAB3_TYPE,
              CONT(4),
           END OF ITAB3_TYPE.
    DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',
          F1(4), F2 TYPE P,
          ITAB3 TYPE STANDARD TABLE OF ITAB3_TYPE WITH NON-UNIQUE
                     DEFAULT KEY INITIAL SIZE 2,
          WA_INDX TYPE INDX.
    Fill the data fields before CLUSTR
    before the actual export
    INDX-AEDAT = SY-DATUM.
    INDX-USERA = SY-UNAME.
    Export der Daten.
    EXPORT F1    FROM F1
           F2    FROM F2
           ITAB3 FROM ITAB3
           TO DATABASE INDX(ST)  FROM WA_INDX ID INDXKEY.
    </i>
    Regards

  • Re: How to converting from PL/SQL query to T-SQL query

    How to converting from PL/SQL query to T-SQL query... Its Urgent

    Download the
    SQL Server Migration Assistant for Oracle.  It will convert whole Oracle databases, or single queries or PL/SQL stored procedures.
    With caution that If your database is using Collation which is case sensitive SSMA will not work.SSMA doesnt guarantees 100% for conversion of Queries/stored proc /database if it fails to do so for some queries you will have to do it manually.
    But you can try
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How to convert database table into xml file

    Hi.
    How to convert database table into XML file in Oracle HTML DB.
    Please let me know.
    Thanks.

    This not really a specific APEX question... but I search the database forum and found this thread which I think will help
    Exporting Oracle table to XML
    If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
    http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
    Hope this helps
    Chris

  • Hi iam new to java can u tell me  how to convert from hashmap to string

    how to convert from hashmap to string

    Hi,
    This is not pure Java forum. Its more on JDBC and data connectivity to Orcle db from Java API.
    This link may answer your question:
    http://stackoverflow.com/questions/960807/hashmapkey-string-value-arraylist-returns-an-object-instead-of-arraylist
    Twinkle

  • How to convert from Restricted material to Unrested Material

    Hi Every Body,
         I have Posted the Batch Material in MB1C . But it was posted in RESTRICTED IN USE. How to convert from Restrict To UNRESTRICTED IN USE. Can Anybody Help me.

    Thank you for solving the problem both SAP Community Network and Mr Jurgen .
    suribabu

Maybe you are looking for

  • How to hide some fields in ABAP Query

    Hi, My ABAP Query has a long list of extracted fields. I wanted to set some of these output to "HIDE". This allow User the flexibility to decide what fields to show. How can I set the field to "HIDE" in my query? Thanks bye

  • Please HELP! I am Losing Apps systematically!!

    This is a bit strange. I have used Macs in one form or another for the last 15 years. I am familiar with them. I have never encountered this problem...or heard of it. 1) About a month ago Safari randomly stopped working. By that, I mean when I try to

  • Institute for Web Dynpro Learning

    Hello... Can anybody guide me about a good institute in India for Web Dynpro.. Please its urgent.... Mail me at [email protected] Thanks

  • "I want to draw a line, and it will highlight when I click it."

    I am currently working on a project right now. My project is a structural analysis software for civil engineers. Our project is already at it's infant stage of development. I am having trouble with how to implement drawing on a canvas. Heres the spec

  • IPhoto Unstable

    I posted a question recently about a problem whereby iPhoto would no longer export titles and descriptions (Does iPhoto no longer include metadata when exporting images as jpegs?) Following advice from Terence Devlin to create a new library and impor