Hi Bob, I tried using your code to generate a string, but when I put it into the $where clause, i'm not getting any results.
Im running a getPage/Rowboat setup, and i'm trying to filter as such:
$a = array(
array(
'City:=' => [[+filter]],
'OR:PostalCode:=' => [[+filter]]
),
array(
'AND:Beds:>=' => 1,
'AND:Baths:<=' => 1
)
);
is the code i used to generate this string, and then in my &where clause as such:
&where=`[{"City:=":[[+filter]],"OR:PostalCode:=":[[+filter]]},{"AND:Beds:>=":[[+beds]],"AND:Baths:>=":[[+baths]]}]`
where bed and bath have their own placeholders, and i have a third placeholder called filter that I need to run against both city and postal code (its an input field).
any idea what is wrong with this setup?
Anthony
Quote from: BobRay at Nov 20, 2011, 10:08 PMIf you're not familiar with JSON notation (and don't want to mess with it), you can make a utility snippet from the code I posted above, change the values to match your search, and return the JSON string from it for display. Then you can paste that string into the &where property.
It's also possible that RowBoat would respond properly to just passing the array in that value.
$where=`array('parent'=>'12,'published'=>'1','deleted'=>'0', 'hidemenu'='0');`
BTW, my code above was incorrect, I've fixed it.