Advertisement

04.02.2008 at 05:00AM PDT, ID: 23288864
[x]
Attachment Details

Wrong cfoutput

Asked by panosms in ColdFusion Application Server, MS SQL Server, Cold Fusion Markup Language

Tags: ADOBE, COLDFUSION

Hello experts.
Because i did not get a working solution for a older questin i want to put the question again but with a more simple way.
I have two tables.
table artikel with columns art_ID(int) and Besonderheiten(varchar)
table extras_all with columns extra_ID(int) and Extra_de(varchar).
The table artikel has for art_Id=85 in the column Besonderheiten 3 values(10,20,30)
art_ID         Besonderheiten
85               10,20,30
The table extras_all is:
extra_ID   Extra_DE
10            value1
20            value2
30            value3
40            value4
(i want to get the values from the column Extra_DE for the values in Besonderheiten)
The output i have is:
art_Id                     extras
858585                  value1,value2,value3value1,value2,value3value1,value2,value3
8585                      value1,value2,value3value1,value2,value3
85                          value1,value2,value3


It schould be only:
85                   value1,value2,value3
here is the code:Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
<cfparam name="SESSION.User_id" default="-1">
<cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
<cfparam name="PageNum_artikel" default="1">
<cfquery name="artikel" datasource="#dsn#">
SELECT a.Art_ID,Extras_All.Extra_DE
FROM dbo.artikel a 
INNER JOIN Extras_All on ',' + a.Besonderheiten + ',' LIKE '%,' + cast(Extras_All.Extra_ID as varchar(20)) + ',%'
WHERE Art_Id=85
</cfquery>
<cfset MaxRows_artikel=10>
<cfset StartRow_artikel=Min((PageNum_artikel-1)*MaxRows_artikel+1,Max(artikel.RecordCount,1))>
<cfset EndRow_artikel=Min(StartRow_artikel+MaxRows_artikel-1,artikel.RecordCount)>
<cfset QueryString_artikel=Iif(CGI.QUERY_STRING NEQ "",DE("&"&XMLFormat(CGI.QUERY_STRING)),DE(""))>
<cfset tempPos=ListContainsNoCase(QueryString_artikel,"PageNum_artikel=","&")>
 
<cfoutput query="artikel" startRow="#StartRow_artikel#" maxRows="#MaxRows_artikel#">
     <table>
  <tr>
    <td><cfoutput>#artikel.Art_id#</cfoutput></td>
    <td><cfoutput>#arraytolist(listtoarray(valuelist(artikel.Extra_DE,',')),', ')#</cfoutput></td>
    
  </tr>
</table>
 
</cfoutput>
[+][-]04.02.2008 at 05:32AM PDT, ID: 21262307

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 06:22AM PDT, ID: 21262712

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 07:07AM PDT, ID: 21263151

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 07:37AM PDT, ID: 21263478

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 07:46AM PDT, ID: 21263582

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 08:14AM PDT, ID: 21263900

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 09:02AM PDT, ID: 21288559

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 12:10PM PDT, ID: 21289238

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 11:47PM PDT, ID: 21290988

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 04:52AM PDT, ID: 21291494

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 06:44AM PDT, ID: 21291726

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 08:41AM PDT, ID: 21292123

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 09:31AM PDT, ID: 21292306

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, MS SQL Server, Cold Fusion Markup Language
Tags: ADOBE, COLDFUSION
Sign Up Now!
Solution Provided By: gdemaria
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.06.2008 at 11:59AM PDT, ID: 21292769

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 12:03PM PDT, ID: 21292783

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.07.2008 at 02:55AM PDT, ID: 21295428

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.07.2008 at 01:32PM PDT, ID: 21300319

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628