TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-13-2012, 09:39 PM   #1 (permalink)
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
Old 01-15-2012, 05:12 AM   #2 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

you can either use your own crown system for your server. Or use the good old fork to spawn an extra thread to work on those emails while. Or use the Gearman system/library which main role is to help do parallelism easier in PHP
tony is offline  
Reply With Quote
Old 11-29-2012, 12:10 PM   #3 (permalink)
The Wanderer
 
Join Date: Nov 2012
Posts: 15
Thanks: 0
abbot is on a distinguished road
Default

w3school site have a many tutorial with example.
abbot is offline  
Reply With Quote
Old 12-21-2012, 12:19 PM   #4 (permalink)
The Visitor
 
Join Date: Dec 2012
Posts: 1
Thanks: 0
morrisdale is on a distinguished road
Default

You can refer the W3school or Google your problem and you will get your solutions. In the mean time, I will also help you solve your problem.
just saying
morrisdale is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
World of Warcraft Armory xml Grabber with cURL mortisimus Show Off 144 06-25-2012 12:34 PM
auto update of a form Can it be done only with PHP crimsont Absolute Beginners 1 07-09-2010 08:59 AM
Problem with mysql_real_escape_string() ETbyrne Advanced PHP Programming 0 12-17-2008 10:39 PM
What is the best way to structure this database? TexasMd91 Advanced PHP Programming 9 07-02-2008 11:20 AM
mysql -- most efficient way to batch process UPDATES drewbee Advanced PHP Programming 3 05-06-2008 12:09 PM


All times are GMT. The time now is 02:46 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design