05-05-2006, 04:56 AM
I want to create a script that will send a mass email to all of the people in a specific table in my database. I have a mysql table that stores:
So what I would like, is some help putting this together using php, and ajax. Can someone post a snippit or something that would help me out in doing this?
Take a look at one/some of those, try implementing them and come back with specific questions?
05-07-2006, 03:14 PM
i am not trying to upload a file, and i couldn't find a site that shows how to use ajax for general script progression.
05-09-2006, 03:26 PM
Okay, I know it sounds like I don't want to do any work, but I learn best from specific examples that show me my final goal. I have found many ajax websites now that have progress bars, but I need some sort of example that does what I want it to do, for me to be able to work with it, and make it bigger. So I am now going to specifically going to ask for someone to write me a basic code, so that I can start somewhere. Please don't see this as me not wanting to do anything on my own. Thank you.
05-10-2006, 03:28 PM
*bump* Can anyone help me out at all please.
05-10-2006, 03:46 PM
Assuming that you know everything up to the point of showing the percentage... you'd need two queries to get the percentage.
One would be to get the number of all the users that will get a mail.
SELECT COUNT(`primary_key`) AS `total_users` FROM `table`;
# I assume every user is being mailed.
The other one would be the number of users who already got the email.
SELECT COUNT(`primary_key`) AS `emailed_users` FROM `table` WHERE `was_emailed` = 1;
The first query only needs to be run once and the second one evertime when you want to check for the percentage.
You calculate the percentage simply by
$emailed_users / $total_users * 100
05-11-2006, 01:31 AM
Prototype has a nifty 'updater' function/class that means you can specify the id of an HTML element (a div for example) and a url, and then every X seconds (you specify this too) the url will be called (in the background) and whatever it returns gets put in the specified div.
05-11-2006, 07:45 PM