i want to check if a table row exist with a trigger. if it does then it does nothing, but if it doesnt exist it inserts a row.
here is my current code i want to modify.
BEGIN
IF (NEW.counter >= 100) THEN
// check if a certain row exists in another table, if not, execute the beneath code
INSERT INTO tagCategories (name, counter) VALUES ('unnamed', NEW.counter);
UPDATE tagCategories2tagPairs SET tagCategoryId = LAST_INSERT_ID() WHERE tagPairId = OLD.id;
END IF;
END
is there any good tutorials on this, teaching all functions you can use with a trigger (they dont look like the php functions)