Forum
Filtering perch_categories using IN
Hi,
I'm having difficulty getting the perch_categories filter to work with the 'IN' match type. The error I'm getting is:
Fatal error: Call to undefined method PerchCategories_Categories::implode_for_sql_in()
and the code causing it:
$types = perch_categories(array(
'set' => 'event-types',
'filter' => 'catID',
'match' => 'in',
'value' => $ids,
'skip-template' => true,
'raw' => true
));
The $ids variable is a string containing '9,10'.
Perch version: (Runway) 2.7.7
That sounds like a bug - I'll take a look at it.
It'll be fixed for 2.7.8.
Thanks Drew, in the meanwhile is there a workaround I can use? It's part of quite a critical section of the site build with a deadline coming up pretty fast.
Search in
lib/PerchFactory.class.php
for:replace with
That's got it - much appreciated!