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

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

Online Web Tutor

4 года назад

17,882 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@smaad7
@smaad7 - 30.11.2021 14:04

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

Ответить
@strongez3357
@strongez3357 - 04.05.2021 08:34

братан у тя голос угарный

Ответить
@cristobalmaldonado6028
@cristobalmaldonado6028 - 24.03.2021 04:41

thanks sir 👍

Ответить
@vigneshs6045
@vigneshs6045 - 17.03.2021 17:33

thanks a lot bro😁

Ответить
@amareshmondal5603
@amareshmondal5603 - 26.12.2020 18:02

You are bad

Ответить
@cheriftouil
@cheriftouil - 13.12.2020 23:57

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

Ответить
@mohammedelghazal6077
@mohammedelghazal6077 - 16.11.2020 15:44

thanks bro

Ответить
@schakkalaka9438
@schakkalaka9438 - 11.08.2020 18:30

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..

Ответить
@AnishKumar-zc3gj
@AnishKumar-zc3gj - 20.02.2020 06:26

Informative..!

Ответить
@kajalthakur3480
@kajalthakur3480 - 09.10.2019 15:32

Very helpful video sir thanku so much

Ответить