evotz Posted April 3, 2014 Share Posted April 3, 2014 With the select_query() SQL helper, is the where array an AND or an OR? select_query("table", "id, user", array("field1" => "variable1", "field2" => "variable2")); Is this saying: select `id`, `user` from `table` where `field1`="variable1" AND `field2`="variable2"; OR select `id`, `user` from `table` where `field1`="variable1" OR `field2`="variable2"; 0 Quote Link to comment Share on other sites More sharing options...
evotz Posted April 4, 2014 Author Share Posted April 4, 2014 It's AND select `id`, `user` from `table` where `field1`="variable1" AND `field2`="variable2"; I enabled MySQL query logging and ran a test. While AND is what I was wanting for this particular purpose, I'm not sure how you get an OR using select_query(). 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.