I am trying to make changes to a huge application that I didn't write.
The application submits samples to multiple emails based on checkboxes on a form. Some checkboxes have multiple emails associated with it - in a database table, delimited by commas.
The problem is multiple emails. One poor soul has his name associated with every checkbox, so he gets 5 emails for the same submission. This is what I'm trying to fix.
The existing code is:
<cfquery name="Microscopymail2" DATASOURCE="EASwitch" dbtype="ODBC">
SELECT Projects.ProjectID, Projects.ProjectEmails, Projects.ProjectPeople, Projects.ProjectName
FROM Projects
WHERE Projects.ProjectID IN
(<cfloop index="MicroscopyprojectID" list="#finalSub.MicroscopySubmissions#" delimiters=",">
#MicroscopyprojectID#,</cfloop>0)
;
</cfquery>
I'm not entirely sure why it was done this way.
I've put the output into a sorted list, but can't think how I would compare them to delete any repetitions. (My reference book is Cold Fusion 4.0, so it didn't even have ListSort as a function!!)
Any help or direction would be appreciated....
Stephanie
The application submits samples to multiple emails based on checkboxes on a form. Some checkboxes have multiple emails associated with it - in a database table, delimited by commas.
The problem is multiple emails. One poor soul has his name associated with every checkbox, so he gets 5 emails for the same submission. This is what I'm trying to fix.
The existing code is:
<cfquery name="Microscopymail2" DATASOURCE="EASwitch" dbtype="ODBC">
SELECT Projects.ProjectID, Projects.ProjectEmails, Projects.ProjectPeople, Projects.ProjectName
FROM Projects
WHERE Projects.ProjectID IN
(<cfloop index="MicroscopyprojectID" list="#finalSub.MicroscopySubmissions#" delimiters=",">
#MicroscopyprojectID#,</cfloop>0)
;
</cfquery>
I'm not entirely sure why it was done this way.
I've put the output into a sorted list, but can't think how I would compare them to delete any repetitions. (My reference book is Cold Fusion 4.0, so it didn't even have ListSort as a function!!)
Any help or direction would be appreciated....
Stephanie