require all values in array to be matched when using where_in |
[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-27-2014, 05:40 PM
require all values in array to be matched when using where_in - by El Forum - 08-27-2014, 05:43 PM
require all values in array to be matched when using where_in - by El Forum - 08-27-2014, 06:11 PM
require all values in array to be matched when using where_in - by El Forum - 08-27-2014, 07:49 PM
require all values in array to be matched when using where_in - by El Forum - 08-27-2014, 07:57 PM
require all values in array to be matched when using where_in - by El Forum - 08-28-2014, 08:15 AM
require all values in array to be matched when using where_in - by El Forum - 08-28-2014, 08:25 AM
require all values in array to be matched when using where_in - by El Forum - 08-28-2014, 08:06 PM
require all values in array to be matched when using where_in - by El Forum - 08-28-2014, 09:00 PM
|