3 Replies Latest reply on Dec 12, 2006 7:27 AM by BKBK

    nested loops,table

    emmim44 Level 1
      Hi. I am having diffulty creating the a table with nested loops. The table came out weird. I need one column contains the Facility name, then the second column has facility times which has rowspan=2 ..on the rowspan there should be peoples names...Any help..thank you.



      <cfquery name="getfacname" datasource="#FormVector#">
      select facname
      from genbid_assignmentinfo
      group by facname
      order by facname
      </cfquery>


      <table width="800" border="1">
      <cfoutput query="getfacname">
      <tr>
      <td width="69" rowspan="2">#facname#</td>

      <cfquery name="getfacname0" datasource="#FormVector#">
      select facname,facsch
      from genbid_assignmentinfo where facname='#facname#'

      order by facname
      </cfquery>
      <cfloop query="getfacname0">
      <td width="712" >#facsch#</td>

      <cfquery name="getfac" datasource="#FormVector#">
      select *
      from genbid_bidresult
      where facsch='#trim(facsch)#' and facname='#trim(facname)#' and factype='SGT'
      order by facname
      </cfquery>




      <tr> <cfloop query="getfac">
      <td width="715">#firstname# #lastname#</td></cfloop>
      </tr>
      </cfloop>
      </tr>
      </cfoutput>
      </table>