MySQL Triggers Tutorials for Beginners #4 - Trigger After Insert & Trigger Before Update

preview_player
Показать описание
In this video we'll see:

TRIGGER AFTER INSERT & TRIGGER BEFORE UPDATE

SOCIAL :
===============

Other Tutorials
===============
Wordpress Customizations:
---------------------------------
and many more...

Javascript framework:
----------------------------------

PHP Frameworks:
----------------------------------

Tags
----------------------------------
mysql triggers tutorials,
mysql triggers for beginners tutorial,
step by step mysql trigger tutorial,
beginners tutorial for mysql triggers,
php mysql triggers tutorials,
online web tutor,
online web tutor mysql triggers tutorial,
online web tutor sanjay,
basics of mysql triggers,
complete mysql triggers tutorial,
tutorials for mysql triggers for beginners,

Thanks
Online Web Tutor
Keep learning and Sharing :)
Рекомендации по теме
Комментарии
Автор

hi
if on my user table my id is named user_id
do I have to do (new.user_id)

smaad
Автор

I'm stuck brother, I needt to use create trigger to insert the max values depending on the table group by one columns like id, can you help me with that bro

cheriftouil
Автор

hello.
i have 2 tables. one with users and one for payments, Payments are in bitcoin.
when the transaction is finished, the value "PAID" on payment table, become "1".

i would like create a trigger, that update the field "IS_PREMIUM" on tbl_users for the user that have pay.
I have do this:

if (new.paid = 1) THEN
update tbl_users SET tbl_users.my_ispremium = 1 WHERE tbl_users.my_deviceid = tbl_users.my_deviceid;

end IF

But it update the "IS_PREMIUM"FIEND FOR ALL USERS. how to fix it?

i use phpmyadmin GUI for create triggers..

schakkalaka