Skip to content

Instantly share code, notes, and snippets.

@alexfinnarn
Created March 7, 2018 17:12
Show Gist options
  • Save alexfinnarn/b319f2629e5a7ccc684550fa7727246b to your computer and use it in GitHub Desktop.
Save alexfinnarn/b319f2629e5a7ccc684550fa7727246b to your computer and use it in GitHub Desktop.
Try db_merge
<?php
db_merge('linkchecker_bean')
->key(array(
'bid' => $bean->bid,
'lid' => $link->lid,
))
->fields(array(
'bid' => $bean->bid,
'lid' => $link->lid,
))
->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment