Coldfusion Script

Phylox

Junior Member
May 26, 2007
7
0
0
Hey everyone, I am on a month long project on a coldfusion script I have to work on. Bare with my noobness here :p Basically here is the jist of it.

-- I have a huge sql database filled with various random people information, such as their phone #"s, email addresses, name, etc...this database it might be going off from could be anywhere from 8,000-15,000 users on it that it will be going off from.

--From time to time I will get a list of say 200-300 email addresses sometimes it can go up to 3000 email addresses from the database whose emails are bounced.

--Now what I am trying to do here is ..making a script where when you input this large list of email addresses, whether it be .txt or just copying it and pasting it into a form with all the bad email addresses...you hit submit..and the system automatically would search the user from its main database to see if it finds the email address, and if it does it retrieves the phone # for that specific person that's stored on the database and outputs it back into the page so every email that's been submitted returns back with a email address and phone # right next to each other...

How complicated would this be to make such a script? ANY help / suggestions / advice / or the jist of what I'm going to be dealing with would be MUCH appreciated.


Thanks
 

drebo

Diamond Member
Feb 24, 2006
7,034
1
81
The key to this is SQL lists.

Tokenize the file containing the email lists (on whatever the delimiter is...space, newline, whatever) and then concatenate it into a comma delimited string.

Use the following type SQL statement:

SELECT name, email, phonenum FROM cust_table WHERE email IN (#list#)

#list# is your string of comma delimited email addresses.

This will return a result set of any people in your database with matching email addresses.

Obviously, this will not indicate email addresses that do not have a match, but that wasn't one of your requirements. If it is, this method won't work.

Alternatively, you could dump the email information into a temporary table and use a "join". Depending on the type of join used (left/right outer join), you could either retrieve all customers whose email was not in the list or all emails that did not match a customer.

If this post is over your head, hire someone to write the app for you.
 

Phylox

Junior Member
May 26, 2007
7
0
0
yes i do have experience / knowledge with coldfusion / html - just more of the beginner to coldfusion...i have written a few simple scripts and what not, still in th elearinng phase for coldfusion....html however i am much more familiar with....thank you for your example drebo, i will see what i can cook up
 

Phylox

Junior Member
May 26, 2007
7
0
0
Right now basically heres what i have done so far
I am able to enter one email address in, it queries the database..and outputs the email with the matched phone # from the database in a table on a webpage

so my question is...how do i make it so i can add multiple email addresses in the form submission and have it so it queries multiple entries and outputs it all on the table?