Jump to content

creating a trigger


jimfog

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...