0

Hello,

I have a table called product and whenever the value of the field stock = 0 I want to send a notification email to a specific email address. I would like your help guys on how I can implement that and if this is possible. I considered using PHP but my application is a Java application and unfortunately Java is not the best with emails. I just want soemthing that checks the stock value and send an email when stok =0.

Advice will be appreciated.

2
Contributors
1
Reply
13
Views
4 Years
Discussion Span
Last Post by pritaeas
0

A trigger can only call MySQL functions. So, unless you build a custom UDF, this is not possible. You could use a trigger to create an email queue table, which you can poll from PHP.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.