I've taken over a site and i see certain tables being updated without any code on the site doing the update. (It's logical updates so I know its by design and not a hacker)

What I can't see in PHP admin and I also have MySql Query Browser is to find what causes them. I'm assuming its a stored procedure and would like to know how to find them. Is there code to retrieve them.

thanks

Recommended Answers

All 7 Replies

Thanks I'll be looking at this tomorrow. I appreciate the help

So I've realized lookin at the links I am looking for a trigger not a stored procedure. I've used show triggers to get a list of the triggers but have not figured out how to get the synax of the trigger themselved.

try this

SHOW CREATE TRIGGER TRIGGER_NAME

Tried it and received an error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER updateNextPaymentDate' at line 1

My sql was

SHOW CREATE TRIGGER updateNextPaymentDate;

Try this :

This should work for sure

select TRIGGER_SCHEMA,TRIGGER_NAME,EVENT_MANIPULATION,EVENT_OBJECT_TABLE,ACTION_STATEMENT from information_schema.TRIGGERS;

Show Create trigger trigger_name should also work,but for some reason its not

you can go with the Above query

ACTION_STATEMENT column will have the sql in trigger

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.