I am combining a form and PHP to create a kind of search.
I am using getResources' tvFilters to show the results of the search, eg:
echo '[[!getResources? &parents=`[[42]]` &tpl=`NewProdTpl` &includeTVs=`1` &includeContent=`1` &limit=`99` &tvFilters=`' . $filters .'`]]';
This works somewhat. But I need to figure out a way to use combined AND and OR conditions, like in SQL, eg:
SELECT supplier_id
FROM suppliers
WHERE (name = 'IBM')
OR (name = 'Hewlett Packard' AND city = 'Atlantic City')
OR (name = 'Gateway' AND status = 'Active' AND city = 'Burma');
Obviously I have tried using brackets like:
$filters = '(Type==Forklift),(Brand==Iseki||Brand==Kubota)';
But I have had no luck.
Would anyone know if there is a way to achieve this?
I don't think tvFilters needs brackets, have you tried this (OR delimiter first):
You could also try adding a wildcard: