I did not want to have to do two transactions in the database, currently I'm doing SELECT
first to know if the record already exists in the table, then I do or INSERT
or UPDATE
depending on the case, to do though a transaction is possible? something like INSERT .... IF NOT EXISTS THEN UPDATE ...
?