rh71
No Lifer
Table "BLAH":
Item - UserMain - UserAlt - Sent
whistle - john@test.com - barry@test.com - no
keys - larry@test.com - ted@test.com - no
clock - ted@test.com - cory@test.com - no
phone - john@test.com - zack@test.com - no
radio - john@test.com - cory@test.com - no
candy - larry@test.com - john@test.com - no
I'm using ColdFusion and have to email each UserMain & each UserAlt (in separate emails) telling them they are responsible for the items... the easier but less practical way is to just go through each row but someone like john@test.com would get 4 emails (1 for each of his items). It is a huge table that changes and that's not going to work for some users.
I would like to send only 1 email to the distinct UserMains or UserAlts listing all their items instead. Complicating this is that the UserAlt column has to be considered, and then update the last column as sent.
Sample emails:
TO: john@test.com
You are responsible for the following:
whistle
phone
radio
candy
TO: larry@test.com
You are responsible for the following:
keys
candy
Is it possible or would I have to create a view and work off that, etc.? The proper SQL just isn't coming to me.
Item - UserMain - UserAlt - Sent
whistle - john@test.com - barry@test.com - no
keys - larry@test.com - ted@test.com - no
clock - ted@test.com - cory@test.com - no
phone - john@test.com - zack@test.com - no
radio - john@test.com - cory@test.com - no
candy - larry@test.com - john@test.com - no
I'm using ColdFusion and have to email each UserMain & each UserAlt (in separate emails) telling them they are responsible for the items... the easier but less practical way is to just go through each row but someone like john@test.com would get 4 emails (1 for each of his items). It is a huge table that changes and that's not going to work for some users.
I would like to send only 1 email to the distinct UserMains or UserAlts listing all their items instead. Complicating this is that the UserAlt column has to be considered, and then update the last column as sent.
Sample emails:
TO: john@test.com
You are responsible for the following:
whistle
phone
radio
candy
TO: larry@test.com
You are responsible for the following:
keys
candy
Is it possible or would I have to create a view and work off that, etc.? The proper SQL just isn't coming to me.
Last edited: