Ask a Question related to Coldfusion Database Access, Design and Development.
-
Captain Ru #1
Help! Iteration/Loop Problem
<CFQUERY NAME="ticket_info" DATASOURCE="HelpDesk">
SELECT *
FROM Help_Desk_List a, NotesTbl b
WHERE a.Entry_ID = #Close_Ticket# AND b.Ticket_ID = #Close_Ticket#
ORDER BY b.Notes_Date DESC
</CFQUERY>
<cfset first = "yes">
<cfoutput query="ticket_info">
<cfif first is "yes">
<cfmail to="Ruel.*********@***********.com"
from="Helpdesk@***************.COM" subject="#Name# has closed ticket
#Entry_ID#."
server="10.1.100.202">
Ticket #Entry_ID# is Closed on #Date_Closed# by #Name#
Note History
<cfif entry_id is ticket_id>
Time of Entry: #Notes_Date#
Priority level: #Priority_Level#
Description: #Entry_Description#
Note: #Notes#
</cfif>
</cfmail>
<cfset first = "no">
</cfif>
</cfoutput>
I *want* 1 email with the body then have it loop over for x number of note
fields. I can only get it to write multiple emails, each with a separate note.
Captain Ru Guest
-
#40654 [NEW]: reference causes foreach to fail proper iteration
From: saeven at saeven dot net Operating system: PHP version: 5.2.1 PHP Bug Type: Scripting Engine problem Bug description: ... -
loop problem
Hi, what is wrong with this part of code? I wish to get all values from mysql_query, but don't get the first element, the last one empty... ... -
Calling a SP multiple times from an ASP page....SP runs first iteration only
Hi, I have an asp page which is called with posted data from a previous asp page containing a form, one of the posted fields in SvrName which is... -
Array and hash iteration questions
I have a CSV file and I'm trying to do a few things with it. Essentially what it boils down to is: count the number of times a certain value is... -
How to bail from an iteration but not the program?...
All- How can I terminate the running of a program from within an iteration, but not leave the program? EG, In this code: ... -
The ScareCrow #2
Re: Help! Iteration/Loop Problem
use the group attribute of the cfoutput tag, lets assume there are a number of
"notes" for each "entry_id"
<cfset first = "yes">
<cfoutput query="ticket_info" group="Entry_ID>
<cfif first is "yes">
<cfmail to="Ruel.*********@***********.com"
from="Helpdesk@***************.COM" subject="#Name# has closed ticket
#Entry_ID#."
server="10.1.100.202">
Ticket #Entry_ID# is Closed on #Date_Closed# by #Name#
Note History
<cfif entry_id is ticket_id>
Time of Entry: #Notes_Date#
Priority level: #Priority_Level#
Description: #Entry_Description#
<cfoutput>
Note: #Notes#
</cfoutput>
</cfif>
</cfmail>
<cfset first = "no">
</cfif>
</cfoutput>
Ken
The ScareCrow Guest
-
Captain Ru #3
Re: Help! Iteration/Loop Problem
what in the....
for some reason, the close tickets is not working. 'add' sends an email, 'add notes' sends and email, but 'close ticket' isn't.
Captain Ru Guest
-
Captain Ru #4
Re: Help! Iteration/Loop Problem
got it
somehow a port found it's way there that shouldn't have
Captain Ru Guest



Reply With Quote

