Tag : Old


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

    Laravel 5 - create quick backend admin panel tutorial

    Laravel 5 - create quick backend admin panel tutorial

    Open Post

    PHP - multiple file uploading dropzone js example

    PHP - multiple file uploading dropzone js example

    Open Post

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Open Post

    Laravel 5 - How to convert file(image, audio, video) extension using CloudConvert?

    Laravel 5 - How to convert file(image, audio, video) extension using CloudConvert?

    Open Post

    Codeigniter 3 - Generate PDF from view using dompdf library with example

    Codeigniter 3 - Generate PDF from view using dompdf library with example

    Open Post

    Jquery - How to copy text to clipboard without flash example ?

    Jquery - How to copy text to clipboard without flash example ?

    Open Post