Hey i am using a query like this:
INSERT INTO likes(
likes_memory_id,
likes_comment_id,
likes_owner_id,
likes_like
) VALUES (
:likes_memory_id,
:likes_comment_id,
:likes_owner_id,
:likes_like)
when ever an user click the like button, this query adds a new row. so this query allows to like multiple time. to prevent this i may use a select statement and i might succeed in two queries but i assue there is a better way to do it. (I made research about if not exists statement but i didnt understand too much ) How do I avoid multiple likes?
Selectrecord, check if exist or not that do actions.