We are creating an app wich uses local and remote DB, the information comes from the remote server and if necessary gets stored in the local DB. The problem is, some records, will come again to the local DB, and i dont want to duplicate the entry, just update it, and if does not exists, insert a new one. In Mysql i probably use :
INSERT INTO 'table'
('key', 'name', 'time')
VALUES
(4815162342, user, NOW())
ON DUPLICATE KEY UPDATE
'name' = newname
Is there a way to use it in SQLite, more specifically with FMDB?