Skip to content
Advertisement

How can I make my sql trigger about inappropiate words work

I have a database with different tables in order to store photos, users, reviews, ratings… I wanna validate that no one uses “bad words” (insults) in their photos’ title or description. So I decided to create a table called ‘inappropiatewords’ where all of these bad words will be stored and then I made the following trigger:

But when I try to run it I’m getting the following error: [error image][1]

I don’t know what I’m doing bad, so if anybody could help me I would be so grateful. I’m using HeidiSQL and MariaDB. [1]: https://i.stack.imgur.com/FFc6a.jpg

UPDATE I’ve made the following change:

but I’m still getting an error 🙁

Advertisement

Answer

It can be a bit simpler

db<>fiddle

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement