• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

join quries

Guest
Sep 26, 2006 Sep 26, 2006

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

273

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 26, 2006 Sep 26, 2006

Copy link to clipboard

Copied

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 & "|">
</cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 26, 2006 Sep 26, 2006

Copy link to clipboard

Copied

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>
<td>
<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>
</cfoutput>
</select>
</td>
</tr></cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 26, 2006 Sep 26, 2006

Copy link to clipboard

Copied

LATEST

> 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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation