As the title says does the SQL implementation in Adobe's AIR platform support "ON DUPLICATE KEY UPDATE"? I am unable to get it to work but it is possible I am using wrong syntax especially if it's different from MySQL syntax. Documentation is very sparse for SQL in flex and the little that I found had no mention of ON DUPLICATE KEY UPDATE. The error I get is quite meaningless: "Error #2044: Unhandled SQLErrorEvent:. errorID=3115, operation=execute , message=Error #3115: SQL Error. , details=near 'ON': syntax error"
The database file does not insert any values at all if I get the error.
var insertQuery:String = "INSERT INTO movies(id, title, type, date_added) VALUES('" +
movieData['id'] + "', '" +
movieData['title'] + "', '" +
movieData['type'] + "', '" +
"2012-01-18 06:05:01" +
"') ON DUPLICATE KEY UPDATE title = 'TEST', type = 'movie', date_added = '2011-11-11 08:02:01'";
It works as expected without the "ON DUPLICATE KEY UPDATE";