Hi muze,
I have the following scenario when doing a query to find an object and show it.
I have created multiple objects with custom name fields. they are filled with information saved on them when created
1: selectedOrganization *contains text*
2: selectedGroup *contains an array*
===== Object 1 (particle)
containing 'selectedGroup' namefield = TEST
===== Object 2 (particle)
containing 'selectedGroup' namefield = TEST * TEST1 * TEST2
Now, when a user logs in, they contain this kind of information so they query is based on the users login
this is how my query looks like:
$query = "object.type='particle' and object.priority>-1 and object.parent = '".$path."'
and custom:a.name ~='status' and custom:a.value ~='published' and custom:b.name ~='selectedOrganization' and custom:b.value ~='".$selectedOrganization."' and custom:c.name ='selectedGroup' and custom:c.value =~~ '".$selectedGroup."' order by priority asc";
PROBLEM:
custom:c.name ='selectedGroup' and custom:c.value =~~ '".$selectedGroup."'
A user contains an array 'selectedGroup'. so Next scenario:
===== User 1
TEST
===== User 2
TEST1 * TEST2
User 1 must see BOTH objects, but can only see object 1 because it's exactly like the string.
User 2 must only see Object 2 but can't because it's not like the string.
How can i do this with the "and custom:c.name ='selectedGroup' and custom:c.value =~~ '".$selectedGroup."' I want a needle / haystack query so if an object contains a part of my string it has to display the file.
Regards,
Kevin