I'm creating function (PHP) which has to run every few hours and update some DB table.
1. If row isn't exist - INSERT
new row
2. If row exist - UPDATE
the current row
I want to write it the easiest and simplest way cause I'll do it for several tables.