shwetapandit Posted September 21, 2013 Share Posted September 21, 2013 i want to know that how can i create a trigger in mysql integrated with php. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/ Share on other sites More sharing options...
trq Posted September 21, 2013 Share Posted September 21, 2013 Just execute a CREATE TRIGGER query. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/#findComment-1450544 Share on other sites More sharing options...
vinny42 Posted September 21, 2013 Share Posted September 21, 2013 I'm guessing the real question is how to make a trigger excute PHP code. You can't. MySQL only support's it's own language. Other databses like PostgreSQL could run a shell script or call a URL to trigger some action (provided that performance allows for it) but in MySQL you're stuck. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/#findComment-1450552 Share on other sites More sharing options...
jazzman1 Posted September 21, 2013 Share Posted September 21, 2013 I'm guessing the real question is how to make a trigger excute PHP code. You can't. MySQL only support's it's own language. Other databses like PostgreSQL could run a shell script or call a URL to trigger some action (provided that performance allows for it) but in MySQL you're stuck. Php can execute a shell script commands. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/#findComment-1450555 Share on other sites More sharing options...
jcbones Posted September 21, 2013 Share Posted September 21, 2013 Not sure that MySQL can though! Which is what Vinny was sayin`.Edit: I know you can from the MySQL CLI, but I think that is the limitations. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/#findComment-1450556 Share on other sites More sharing options...
vinny42 Posted September 21, 2013 Share Posted September 21, 2013 Php can execute a shell script commands. Yup, but that was not the question. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/#findComment-1450561 Share on other sites More sharing options...
Barand Posted September 21, 2013 Share Posted September 21, 2013 Nor was the question about PostgreSQL being able to run commands. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/#findComment-1450564 Share on other sites More sharing options...
vinny42 Posted September 21, 2013 Share Posted September 21, 2013 Get a life barand, please. I answered the ops question, you just post so complain. Grow up. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/#findComment-1450569 Share on other sites More sharing options...
mac_gyver Posted September 23, 2013 Share Posted September 23, 2013 @madhuvishwakarma posting generic copy/past search results you found on the Internet doesn't help the OP with the specific problem in his code and isn't how programming help works. Please use the forum's bbcode tags (the edit form's <> button) when posting code. Link to comment https://forums.phpfreaks.com/topic/282335-how-can-i-create-triggers-in-mysql-using-php/#findComment-1450789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.