Skip to content

Instantly share code, notes, and snippets.

@midnai
Created February 8, 2018 06:28
Show Gist options
  • Save midnai/5a1baeb26f6cb9c1effdcc45cb6a8817 to your computer and use it in GitHub Desktop.
Save midnai/5a1baeb26f6cb9c1effdcc45cb6a8817 to your computer and use it in GitHub Desktop.
Some drupal 8 conditions
$query->condition('myfield', array(1, 2, 3), 'IN');
$query->condition('myfield', array(5, 10), 'BETWEEN');
$query->condition('myfield', array(1, 2, 3), 'NOT IN');
$query->isNull('myfield');
$query->isNotNull('myfield');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment