User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 391,929 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,715 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 370 | Replies: 7
Reply
Join Date: Jul 2008
Posts: 4
Reputation: michaelh613 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
michaelh613 michaelh613 is offline Offline
Newbie Poster

How to find a stored procedure

  #1  
Jul 17th, 2008
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 406
Reputation: Sulley's Boo will become famous soon enough Sulley's Boo will become famous soon enough 
Rep Power: 5
Solved Threads: 9
Sulley's Boo's Avatar
Sulley's Boo Sulley's Boo is offline Offline
Posting Pro in Training
Join Date: Jul 2008
Posts: 4
Reputation: michaelh613 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
michaelh613 michaelh613 is offline Offline
Newbie Poster

Re: How to find a stored procedure

  #3  
31 Days Ago
Thanks I'll be looking at this tomorrow. I appreciate the help
Reply With Quote  
Join Date: Jul 2008
Posts: 4
Reputation: michaelh613 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
michaelh613 michaelh613 is offline Offline
Newbie Poster

Re: How to find a stored procedure

  #4  
31 Days Ago
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.
Reply With Quote  
Join Date: Jun 2008
Posts: 34
Reputation: varmadba is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
varmadba varmadba is offline Offline
Light Poster

Re: How to find a stored procedure

  #5  
31 Days Ago
try this

 SHOW CREATE TRIGGER TRIGGER_NAME 
:- Varma
Reply With Quote  
Join Date: Jul 2008
Posts: 4
Reputation: michaelh613 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
michaelh613 michaelh613 is offline Offline
Newbie Poster

Re: How to find a stored procedure

  #6  
31 Days Ago
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;
Last edited by michaelh613 : 31 Days Ago at 7:51 am.
Reply With Quote  
Join Date: Jun 2008
Posts: 34
Reputation: varmadba is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
varmadba varmadba is offline Offline
Light Poster

Re: How to find a stored procedure

  #7  
30 Days Ago
ACTION_STATEMENT column will have the sql in trigger
:- Varma
Reply With Quote  
Join Date: Jun 2008
Posts: 34
Reputation: varmadba is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 4
varmadba varmadba is offline Offline
Light Poster

Re: How to find a stored procedure

  #8  
30 Days Ago
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
:- Varma
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 8:26 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC