Hi,
I have a Select Multiple field in which I am storing the key/value pairs as JSON format in the DB. This works fine, when I var_dump the cck object the key and value arrays are returned just like I'd expect, value returning they key which is what I want.
The problem is I cannot use this field within Search form to filter items based on choices made. When I try to filter using the stored information I get a SQL error, with no real hint as to the cause of the issue:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY t2.myordering ASC LIMIT 8' at line 7
In the DB, the field is stored like:
{"name-i-defined":"key"}
My field configuration is:
JSON-FREE-fieldName[name-i-defined]
(I also tried Article storage instead of Free with no change)
I do notice the error does not occur only for my own custom field, but also one seblod includes e.g: Show Author - Select Simple field. The same issue is occur.
I set the Matching as "Any Words Exact", with correct seperator specified as my field uses ','. But I tried other matching options and not one of them works except for 'None', which obviously isn't much help :).
Thanks for the help,
Nikck