Skip to content

Instantly share code, notes, and snippets.

@milankragujevic
Last active June 15, 2016 17:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milankragujevic/aef76945d7885df7b0c8 to your computer and use it in GitHub Desktop.
Save milankragujevic/aef76945d7885df7b0c8 to your computer and use it in GitHub Desktop.
<?php
db_query("SELECT * FROM {users} where name IN (:name)", array(':name'=>array('user1','user2')));
//SELECT * from users where name IN (:name_0, :name_1)
db_query("SELECT * FROM {users} where name IN (:name)", array(':name'=>array('test -- ' => 'user1','test' => 'user2')));
//SELECT * FROM users WHERE name = :name_test -- , :name_test AND status = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment