View Single Post
Old 01-13-2012, 09:39 PM   #1 (permalink)
captainmerton
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default SELECT and UPDATE

I am wondering how to design a certain transaction process i want to build into my website and am looking for any guidance people have.

I have a website which accepts rental enquiries onto a table. I've been emailing out the enquiries to around 60 email addresses as they are submitted into an html form on the site and also updating the mysql table. As the number of emails i have to send grows i realise i want to create a cron job to send the mails now. As the enquiries are added to the mysql table i want to set a status column to A for "awaiting posting". I then want the cron job to pick up all status A enquiries and send out emails whilst setting the status on the table to P for "posted." Query i have is how do i cater for the fact that enquiries may be coming in as i am reading the table making this prone to issues. What is the best way to handle this scenario?

Thanks,
Ewan
captainmerton is offline  
Reply With Quote