AJAX - mass db insert with progress

Associate
Joined
18 Oct 2002
Posts
1,312
Location
Milton Keynes
Heya

Have been trying to get something working for a while now and its not playing ball. I have a mass emailer script, and I want it to show progress of how that campaign is sending once you click send.

Basically want to click go and it will run the script that will loop through and send the emails. Want to also have another query running every 10 seconds or so to see all the emails that have been sent for that batch.

Problem is that when I run both at the same time it wont return the select query until the inserts have finished :( Any ideas?

I believe it might have something to do with sessions and 'race conditions'? Basically want to strip it right back to forgetting the emails I have just an insert query and a select query, as each row goes in i want it to show the latest rows in a progress list. Anyone done this?
 
Can we see your javascript code please

Just asking if the theory is achievable or not. Ie can you have 2 scripts being run by ajax, one being an insert query and one being a select query to show progress

was just thinking if i left a massive insert script going, you can check phpmyadmin to see how its doing even though the php insert script hasnt displayed anything yet. Want something like that but running from the same page.
 
Last edited:
infact it doesnt even have to be 2 scripts, i just want some kind of progress of the inserts

cant find any helpful information anywhere and it just seems like someone somewhere must have wanted to do the same thing??
 
Back
Top Bottom