HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Building queries

tmilovantmilovan New
edited August 2010 in Vanilla 2.0 - 2.8

I would like to build a display that will list only posts from certain categories but query bulding documentation is scarce. I have made everything works except selecting posts from multiple categories.

I have $Wheres array '$Wheres = array('d.CategoryID' => 5)' but dont know how to put 'OR' clause in it so I could select posts from few more categories.

Any hint appreciated :).


  • ToddTodd Chief Product Officer Vanilla Staff
    You can use OrWhere(), but you should probably use WhereIn('d.CategoryID', array(5, 6, 7))
  • Great thanks.
    I'm starting to like this application very much :).
Sign In or Register to comment.