I want to update a record, which may or may not be in the table. If it is not in the database, it will be inserted.
To prevent selection, I first use the operator UPDATEand check affected_rows > 0if not, then I insert this record into the table.
I was wondering if there is a better way to do this?
Jason source
share