I have a table containing several columns and I want to make sure that two particular columns don't have the same value. Actually I don't want to allow a user to report an error several times. Before inserting the report I want to make sure that the same user haven't reported the same content, so there shouldn't be a row with a similar user ID and content ID. What I have in mind is sending a query to check if it returns a result, and if it doesn't then insert the report. But there must be a better way.
Thanks for your help.