Tag : After


Example of trigger on after delete with update query mysql

Sometimes we need to fire trigger like after delete update some fields of another tables. for example if you have chat_message tables and when remove row on this table then we need to update "remove_counter(remove_counter + 1)" on users table. i did give you bellow example you can see how to write trigger code: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> delimiter // CREATE TRIGGER add_ban_counter_in_users AFTER DELETE ON `chat_messages` FOR EACH ROW BEGIN UPDATE `users` SET remove_counter = users.remove_counter + 1 WHERE users.id = old.user_id.....

By Hardik Savani | April 5, 2016 | | 964 Viewer | Category : PHP MySql SQL
READ MORE

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Open Post

    Simple PHP Jquery Ajax CRUD(insert update delete) tutorial example with source code

    Simple PHP Jquery Ajax CRUD(insert update delete) tutorial example with source code

    Open Post

    Laravel 5.3 - Create Bootstrap Contact US Form using Form Request

    Laravel 5.3 - Create Bootstrap Contact US Form using Form Request

    Open Post

    Twitter Bootstrap - Digital Clock picker with AM PM example using clockface plugin

    Twitter Bootstrap - Digital Clock picker with AM PM example using clockface plugin

    Open Post

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post

    MySQL Query - How to select records of today to next Sunday ?

    MySQL Query - How to select records of today to next Sunday ?

    Open Post