What's the problem with: "SELECT * FROM `user` WHERE role_id IN (?) AND partner_id IN (?)"
and then: executeQuery($sql, array($this->role_ids, $this->partner_ids), array(\Doctrine\DBAL\Connection::PARAM_INT_ARRAY, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY)); ? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 1 August 2014 15:48, Jarrad Frecklington <[email protected]> wrote: > G'day, > > I'm trying to recreate a query along the lines of: > select * from user where u.role_id in array_of_roles and u.partner_id in > array_of_partners > > I have read the documenation I could find ( > http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html#list-of-parameters-conversion) > but I couldn't find anything on the second array parameter, any ideas? > > I tested the single array parameter and it was working fine with the > following: > $sql = "SELECT * FROM `user` WHERE role_id IN (?)"; > executeQuery($sql, array($this->role_id), > array(\Doctrine\DBAL\Connection::PARAM_INT_ARRAY)); > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/doctrine-user. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
