I have an items tables, a tokens table, and a items_tokens join table.
can be multiple joins for an items, tokens pair, i.e. a token appears
times in an item. I would like to increment a column in the tokens for
time it appears in in the join table. It seems that “UPDATE tokens JOIN
items_tokens ON items_tokens.token_id = tokens.id set occurrences =
occurrences + 1 WHERE items_tokens.item_id = 339;” (for item 339) would
trick but it only increments each occurrences at most once, i.e.
are removed before incrementing occurrences. Is there a way to do this