Page 1 of 1

Insert or Update-if-existing

Posted: Sat Nov 02, 2013 4:34 pm
by mondo

I'd like to push to the Appery.io DB, but I want to base it off a unique key. If the key exists, then UPDATE, else INSERT... like mysql Update on Duplicate (http://dev.mysql.com/doc/refman/5.0/e...).

Is this possible without first querying and THEN deciding action?


Insert or Update-if-existing

Posted: Sat Nov 02, 2013 6:21 pm
by maxkatz

You can first check wether such object exists in the database and based on the result do another request.