3 Replies Latest reply on Sep 26, 2006 8:49 AM by <newbie />

    join quries

      Hi i have a cfoutput query which displays 11 list boxes from the query "SelectNames", i have the selected value working ok

      what i need now is to have a list of "#Surname#, #FirstName#" from the query "SelectALL"

      think i need to join the two queries not sure how to do it any ideas
        • 1. Re: join quries
          Dan Bracuk Level 5
          A list of surname, firstname from the query SelectAll? You didn't specifiy your delimiter, so I'll use a pipe.

          <cfset mylist="">
          <cfoutput query="selectall">
          <cfset mylist = mylist & surname & ", " & firstname & "|">
          • 2. Re: join quries
            JohnGree Level 1
            not sure if you understood what i need,

            i have 2 option values below, the second one should show a list of all surnames, firstname, but it actually only shows one, because i have a output query allready "SelectNames" i need to have another ie nested but this cant be done, so how esle can i do this

            <cfoutput query="SelectNames"><tr>
            <select name="Player1">
            <option value="#SelectNames.PlayerID#" selected>#SelectNames.Surname#, #SelectNames.FirstName#</option>
            <cfoutput query="SelectALL">
            <option value="#SelectALL.PlayerID#">#SelectALL.Surname#, #SelectALL.FirstName#</option>
            • 3. Re: join quries
              <newbie /> Level 1

              > actually only shows one, because i have a output query allready

              If you replace your second cfoutput tag with cfloop, you should be able to
              overcome this particular problem.

              For example,
              use <cfloop query="SelectALL">
              instead of <cfoutput query="SelectALL">

              Good luck!