Welcome Guest, Not a member yet? Register   Sign In
require all values in array to be matched when using where_in
#7

[eluser]CroNiX[/eluser]
You can probably do it using a HAVING clause in addition to your IN clause. See the top answer for this post:
http://stackoverflow.com/questions/11636...-in-clause

Not sure how you'd do it with Active Record.

It'd be something like:
PHP: $quantity = count($this->session->userdata('selected_features'));
SQL: HAVING COUNT(DISTINCT feat_prop_join.feature_id) = $quantity


Messages In This Thread
require all values in array to be matched when using where_in - by El Forum - 08-28-2014, 08:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB