In my database, I have tickets_users
that affiliate users to a ticket.
I'd like to do an INSERT
that checks in tickets_users
if there is not already this users_id
(for example user 1444) and type = 2 WHERE tickets_id = something
(for example ticket number 455); if it already exists do nothing, else
INSERT INTO tickets_users (tickets_id, users_id, type) VALUES (455, 1444, 2)
WHERE tickets_id = 455