Created
March 7, 2018 17:12
-
-
Save alexfinnarn/b319f2629e5a7ccc684550fa7727246b to your computer and use it in GitHub Desktop.
Try db_merge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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