On 08/20/2010 04:27 PM, Matt Juszczak wrote:
I get the use of triggers but can you explain the queue concept?
Let's say I want to be notified every time the count of
an item is increased. How would a queue play into that?
Have a trigger create a record in the event queue, and then have a
process that runs to process the queue (could be a cron, or a daemon)
and send out emails, etc.
-Matt
Not to discount Matt's solution; it is a good one. But for the sake of
completeness: you could also use the observer pattern here.
Some articles about it.
http://devzone.zend.com/article/12229
http://www.phpro.org/tutorials/Design-Patterns.html#6
http://www.fluffycat.com/PHP-Design-Patterns/Observer/
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org/Show-Participation