Skip to content

Instantly share code, notes, and snippets.

@thyseus
Created April 28, 2017 14:07
Show Gist options
  • Save thyseus/030d978e7e9e4a0b30ec3635bc5b5fb0 to your computer and use it in GitHub Desktop.
Save thyseus/030d978e7e9e4a0b30ec3635bc5b5fb0 to your computer and use it in GitHub Desktop.
User::find()->where('id != 1')->andWhere(['or', ['>', 'age', 40], ['<', 'age', 20]])->all();
"SELECT * FROM `users` WHERE (id != 1) AND ((`age` > :qp0) OR (`age` < :qp1))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment