We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

in MySQL-Trigger how to assign- Controller path

Development and Programming

fnbhns's avatar
fnbhns
22 posts
8 years ago
fnbhns's avatar fnbhns

Dear All,

I am new in using - PHP-Codeigniter 2.1.3, MySQL , XAMPP. I have a Database tables Customer, While new customer interested into the table, I want that immediately to sent a mail or SMS to his phone.

I tried the following code, In MySQL table I added a trigger with customer table, In that trigger I wanted to assign my php file or CONTROLLER Path to sent mail, but showing errors.

BEGIN
IF NEW.flag = 1 THEN
   DECLARE result CHAR(255);
   SET cmd = CONCAT('E:/xampp/php/php.exe -f "E:/xampp/htdocs/DEN/sentEmail.php"');
   SET result = sys_exec(cmd);
END IF;
END

How can I solve this issue, is there any other easy way please…!! I am highly expecting your idea and kind support. Thanking you in Advance.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.