# Post.where() causing 500 error

**URL:** <https://meta.discourse.org/t/post-where-causing-500-error/40896>\
**Category:** Development\
**Created:** [March 11, 2016, 10:33am UTC](https://meta.discourse.org/t/post-where-causing-500-error/40896 "2016-03-11T10:33:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Andrew\_Byrne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrew_byrne/32/116413_2.png) [@Andrew\_Byrne](https://meta.discourse.org/u/Andrew_Byrne)\
**Post date:** [March 11, 2016, 11:23am UTC](https://meta.discourse.org/t/post-where-causing-500-error/40896/3 "2016-03-11T11:23:06Z")

</div>

so good of you to ask, and admittedly that helped… 😃

BUT perhaps you can assist further with my query! The issue was the input value  
while I can do

ok  
` Post.where('user_id: '1,2') #works`

```
Post.where('topic_id: '4,5') #works

```

Fails  
`Post.where('user_id = ? or topic_id = ?', '1,2', '4, 5') #fails!`

So again I assume! I’ll need to iterate over each user id, but… NOOOOB (assistance greatly appreciated!

---

_[View the full topic](https://meta.discourse.org/t/post-where-causing-500-error/40896)._
