I have a database with submissions inserted from a web server.
If a submission is made again (i.e. with same user_id and problem_id), I want it to overwrite the row in the database. Currently, when I try to make the insert statement again, it obviously just fails and gives me a duplicate row error. As I don't know if a row is going to exist or not, is there a simple way to automatically insert/overwrite?
Thanks, Wes
If a submission is made again (i.e. with same user_id and problem_id), I want it to overwrite the row in the database. Currently, when I try to make the insert statement again, it obviously just fails and gives me a duplicate row error. As I don't know if a row is going to exist or not, is there a simple way to automatically insert/overwrite?
Thanks, Wes
Comment