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. Quote Link to comment Share on other sites More sharing options...
trq Posted September 21, 2013 Share Posted September 21, 2013 Just execute a CREATE TRIGGER query. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
jcbones Posted September 21, 2013 Share Posted September 21, 2013 (edited) 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. Edited September 21, 2013 by jcbones Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.