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 | | 2753 Viewer | Category : PHP MySql SQL
READ MORE

    Laravel 5 - line chart example code using google charts API

    Laravel 5 - line chart example code using google charts API

    Open Post

    Laravel 5 Google OAuth authentication using Socialite Package

    Laravel 5 Google OAuth authentication using Socialite Package

    Open Post

    Laravel 5 - "syntax error or access violation 1055 in group by" Solved

    Laravel 5 - "syntax error or access violation 1055 in group by" Solved

    Open Post

    Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 2

    Laravel 5 - Dynamic Dependant Select Box using JQuery Ajax Example - Part 2

    Open Post

    How to create custom scrollbar using jquery mcustomscrollbar plugin ?

    How to create custom scrollbar using jquery mcustomscrollbar plugin ?

    Open Post

    Laravel 5.5 CRUD Example from scratch

    Laravel 5.5 CRUD Example from scratch

    Open Post