This seems like such a simple problem but Google cannot seem to find much on the topic.
For caching reasons I want to run a query to let a user like something:
INSERT INTO tbl_review_vote (user_id,review_id,vote) VALUES(:uid,:rid,:vote) ON DUPLICATE KEY UPDATE vote=:vote
But then understand from the server response whether or not the like was inserted or updated so that I can pre-aggregate a likes
to the user review record.
Is there a good way of doing this?