2
I have the following problem, I want after I delete a location from the leases table I go in the movies table and make the situation column as available, but in case I have the movie code in the leases table in another record, i still leave the table situation column movie as leased, as I would do it?
That’s what I’ve done.
TRIGGER `tguDelete` AFTER DELETE ON `locacoes` FOR EACH ROW UPDATE filmes SET situacao = 'Disponivel' WHERE id_locacao = OLD.id_locacao
These are my tables
Use phpmyadmin, and I’m a beginner in mysql
Is it really necessary to use Trigger? There is an application consuming this database?
– Leandro Amarilha
Yes, it’s my course work
– Pr99