• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "MySQL triggers: passing a PK to a stored proc on the row that forced trigger?"

Collapse

  • minestrone
    replied
    Originally posted by lilelvis2000 View Post
    And I don't even do MySQL...I looked it up in my MySQL Cookbook!
    My database skills are fairly shocking, I just seem to busk every task I have.

    When I am programming in Java I know exactly what I am writing, the next 20 lines I am going to write and have a rough idea what I am going to be writing on the next hour.

    Stored procs I seem to get by with "I think that might work" "**** it never worked" "how the **** do you debug this thing" "try this" repeated for 8 hours

    Leave a comment:


  • lilelvis2000
    replied
    And I don't even do MySQL...I looked it up in my MySQL Cookbook!

    Leave a comment:


  • minestrone
    replied


    Cheers!

    Leave a comment:


  • lilelvis2000
    replied
    CREATE TRIGGER
    db.myTrigger
    AFTER UPDATE ON
    db.myTable table
    FOR EACH ROW
    begin
    myStoredProc( NEW.id ) ;
    end;

    Does that not work?

    Leave a comment:


  • MySQL triggers: passing a PK to a stored proc on the row that forced trigger?

    Anyone know of this can be done? I have a trigger...

    Code:
    CREATE TRIGGER
      db.myTrigger
    AFTER UPDATE ON
      db.myTable
    FOR EACH ROW CALL
       myStoredProc() ;
    ...but I want to pass the pk of the row being updated to the stored proc, I though it would work something like this..

    Code:
    CREATE TRIGGER
      db.myTrigger
    AFTER UPDATE ON
      db.myTable table
    FOR EACH ROW CALL
       myStoredProc( table.id ) ;
    ...but computer says no, trigger docs on mySql are not that great as they just introduced the functionality.

    Cheers

Working...
X