Trigger in MySQL upon changing stock statusMySQL InnoDB Plugin default engine type not accepting config...

Metadata API deployments are failing in Spring '19

What's a good word to describe a public place that looks like it wouldn't be rough?

Why didn't Eru and/or the Valar intervene when Sauron corrupted Númenor?

Word to be used for "standing with your toes pointing out"

Could be quantum mechanics necessary to analyze some biology scenarios?

Is my plan for fixing my water heater leak bad?

How to properly claim credit for peer review?

Where was Karl Mordo in Infinity War?

Where is this triangular-shaped space station from?

If all harmonics are generated by plucking, how does a guitar string produce a pure frequency sound?

Find the number of ways to express 1050 as sum of consecutive integers

raspberry pi change directory (cd) command not working with USB drive

Criticizing long fiction. How is it different from short?

How to approximate rolls for potions of healing using only d6's?

Do authors have to be politically correct in article-writing?

On what did Lego base the appearance of the new Hogwarts minifigs?

Do commercial flights continue with an engine out?

Meaning of すきっとした

How can I introduce myself to a party without saying that I am a rogue?

If I delete my router's history can my ISP still provide it to my parents?

4 Spheres all touching each other??

"Sheng" as a male given name

How to push a box with physics engine by another object?

Connecting top and bottom of adjacent circles



Trigger in MySQL upon changing stock status


MySQL InnoDB Plugin default engine type not accepting config settingGenerating Invoices and TrackingHow to update Status using IF Condition in Mysql triggerMySQL code to show specific rows based on another…?How to create an insert trigger?How can I properly use a trigger inside of stored procedure to validate an email?Update trigger fired before insert trigger upon insert of new rowMySQL Trigger IF StatementStock quantity TriggerError trying to update stock with trigger













1















enter image description here



This are one of the requirement that have to be done for my assignment and I am having a trouble on how or where do i start. my lecturer told us smth having a trigger and he is reluctant to guide us how we should so it.



I have an Ordertbl where if the order status are set as "Ordered" the stock will remain the same where if the status are changed to "Received" the stock increases, same as having a "Delivered" status, the qty will be deducted from the inventory:



Scenario:



I ordered product from Supplier and the status are "Ordered", then the Admin or Clerk can change the status to "Received" thus the qty will be add up to the InventoryTbl.



How do i implement the trigger thing in MySQL?



I am using .jsp. Do I have to create the trigger code in .jsp or in database?










share|improve this question
















bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • You just need to make a trigger with it exact action time (BEFORE|AFTER) in the affected tables. Edit your post and add your SHOW CREATE TABLE xxxx and some data test.

    – oNare
    Oct 27 '15 at 21:18


















1















enter image description here



This are one of the requirement that have to be done for my assignment and I am having a trouble on how or where do i start. my lecturer told us smth having a trigger and he is reluctant to guide us how we should so it.



I have an Ordertbl where if the order status are set as "Ordered" the stock will remain the same where if the status are changed to "Received" the stock increases, same as having a "Delivered" status, the qty will be deducted from the inventory:



Scenario:



I ordered product from Supplier and the status are "Ordered", then the Admin or Clerk can change the status to "Received" thus the qty will be add up to the InventoryTbl.



How do i implement the trigger thing in MySQL?



I am using .jsp. Do I have to create the trigger code in .jsp or in database?










share|improve this question
















bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • You just need to make a trigger with it exact action time (BEFORE|AFTER) in the affected tables. Edit your post and add your SHOW CREATE TABLE xxxx and some data test.

    – oNare
    Oct 27 '15 at 21:18
















1












1








1








enter image description here



This are one of the requirement that have to be done for my assignment and I am having a trouble on how or where do i start. my lecturer told us smth having a trigger and he is reluctant to guide us how we should so it.



I have an Ordertbl where if the order status are set as "Ordered" the stock will remain the same where if the status are changed to "Received" the stock increases, same as having a "Delivered" status, the qty will be deducted from the inventory:



Scenario:



I ordered product from Supplier and the status are "Ordered", then the Admin or Clerk can change the status to "Received" thus the qty will be add up to the InventoryTbl.



How do i implement the trigger thing in MySQL?



I am using .jsp. Do I have to create the trigger code in .jsp or in database?










share|improve this question
















enter image description here



This are one of the requirement that have to be done for my assignment and I am having a trouble on how or where do i start. my lecturer told us smth having a trigger and he is reluctant to guide us how we should so it.



I have an Ordertbl where if the order status are set as "Ordered" the stock will remain the same where if the status are changed to "Received" the stock increases, same as having a "Delivered" status, the qty will be deducted from the inventory:



Scenario:



I ordered product from Supplier and the status are "Ordered", then the Admin or Clerk can change the status to "Received" thus the qty will be add up to the InventoryTbl.



How do i implement the trigger thing in MySQL?



I am using .jsp. Do I have to create the trigger code in .jsp or in database?







mysql trigger






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 27 '15 at 21:20









oNare

2,67921231




2,67921231










asked Oct 27 '15 at 16:03









lanouvalanouva

61




61





bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 13 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • You just need to make a trigger with it exact action time (BEFORE|AFTER) in the affected tables. Edit your post and add your SHOW CREATE TABLE xxxx and some data test.

    – oNare
    Oct 27 '15 at 21:18





















  • You just need to make a trigger with it exact action time (BEFORE|AFTER) in the affected tables. Edit your post and add your SHOW CREATE TABLE xxxx and some data test.

    – oNare
    Oct 27 '15 at 21:18



















You just need to make a trigger with it exact action time (BEFORE|AFTER) in the affected tables. Edit your post and add your SHOW CREATE TABLE xxxx and some data test.

– oNare
Oct 27 '15 at 21:18







You just need to make a trigger with it exact action time (BEFORE|AFTER) in the affected tables. Edit your post and add your SHOW CREATE TABLE xxxx and some data test.

– oNare
Oct 27 '15 at 21:18












1 Answer
1






active

oldest

votes


















0














You would create the trigger on each table in the mysql DB that is affected.



The article below provides information on how to create a trigger -



https://dev.mysql.com/doc/refman/5.0/en/create-trigger.html






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f119335%2ftrigger-in-mysql-upon-changing-stock-status%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You would create the trigger on each table in the mysql DB that is affected.



    The article below provides information on how to create a trigger -



    https://dev.mysql.com/doc/refman/5.0/en/create-trigger.html






    share|improve this answer




























      0














      You would create the trigger on each table in the mysql DB that is affected.



      The article below provides information on how to create a trigger -



      https://dev.mysql.com/doc/refman/5.0/en/create-trigger.html






      share|improve this answer


























        0












        0








        0







        You would create the trigger on each table in the mysql DB that is affected.



        The article below provides information on how to create a trigger -



        https://dev.mysql.com/doc/refman/5.0/en/create-trigger.html






        share|improve this answer













        You would create the trigger on each table in the mysql DB that is affected.



        The article below provides information on how to create a trigger -



        https://dev.mysql.com/doc/refman/5.0/en/create-trigger.html







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 27 '15 at 16:40









        MJCookieMJCookie

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f119335%2ftrigger-in-mysql-upon-changing-stock-status%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

            Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

            How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...