I would like to run a query similar to INSERT IGNORE INTO the_table (nid, language) VALUES (8, 'Chinese')
, but I cannot find any documentation on how the "IGNORE" statement works with the Drupal DB API.
Does anyone know how to achieve that?
db_merge('the_table')
->key(array('nid' => 8, language' => Chinese))
->fields(array(
'nid' => 8,
'language' => Chinese,
))
->updateExcept('nid','language')
->execute();
Would the code above be the equivalent of my initial query ?
EDIT: updateExcept method doesn't exist, no idea why it s still in the documentation