jimfog Posted September 10, 2013 Share Posted September 10, 2013 I want to create a trigger. This trigger requires a variable related to a user in order to be carried out. So, the question is if I can put the trigger in a function in a PHP script and perform it the usual way queries are performed...mysqli->query Link to comment Share on other sites More sharing options...
thescientist Posted September 10, 2013 Share Posted September 10, 2013 probably. You're the developer, you can make your code whatever you want, although I'm pretty unclear exactly what you are trying to do. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 10, 2013 Share Posted September 10, 2013 Put the trigger in a function? That doesn't really make sense. You mean write a function that creates a trigger on a table? You can send a query to run a user-defined function or stored procedure if that's what you're trying to do, check the MySQL manual for the correct syntax to use. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now