Skip to content

Instantly share code, notes, and snippets.

@mrsinguyen
Created June 8, 2010 07:45
Show Gist options
  • Save mrsinguyen/429739 to your computer and use it in GitHub Desktop.
Save mrsinguyen/429739 to your computer and use it in GitHub Desktop.
<?php
db_merge('example')
->key(array('name' => $name))
->fields(array(
'field1' => $value1,
'field2' => $value2,
))
->expression('field1', 'field1 + :inc', array(':inc' => 1))
->execute();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment