Last active
April 17, 2018 15:23
-
-
Save IvanAlekseevichPopov/f6692a4a31ccbc92618dfefaa805652a to your computer and use it in GitHub Desktop.
in query with array as parameter
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
use Doctrine\DBAL\Connection; | |
... | |
return $this | |
->getEntityManager() | |
->getConnection() | |
->executeQuery( | |
'SELECT * from posts WHERE id IN (?)', | |
[$postIdCollection], | |
[Connection::PARAM_INT_ARRAY] | |
) | |
->fetchAll(\PDO::FETCH_UNIQUE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment