I’m going to store some words inside db my_table (id,word) as follow

Now i’ve input post
$comment = $_POST[comment]; // "blab blah shit blah" have banned word (shit)
i want to do the following
if the comment contains any of the stored words inside my_table then it gives echo "banned"; exit; and if not then go on echo "passed";
how then to compare it ?
is this could be right
SELECT 1
FROM my_table
WHERE $comment LIKE CONCAT('%', my_table.word , '%')
LIMIT 1
then if gives results then echo "banned"; and if not then echo "passed"; !
I just quickly wrote this. Not really tested but it can give you an idea on how to go about yours in a more optimized way.