Hi All,
i have make a k2 extra field which is multi select and using it as a select drop down at the front end , while filtering data from the front end its not showing the exact result its showing the extra data also.
I have print the query and got the below query.
SELECT DISTINCT i., CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END as lastChanged, c.name as categoryname,c.id as categoryid, c.alias as categoryalias, c.params as categoryparams FROM #__k2_items as i RIGHT JOIN #__k2_categories AS c ON c.id = i.catid WHERE i.published = 1 AND i.access IN(1,1,5) AND i.trash = 0 AND c.published = 1 AND c.access IN(1,1,5) AND c.trash = 0 AND c.language IN (‘en-GB’,’‘) AND i.language IN (‘en-GB’,’‘) AND ( i.publish_up = ‘0000-00-00 00:00:00’ OR i.publish_up <= ‘2016-02-05 06:52:01’ ) AND ( i.publish_down = ‘0000-00-00 00:00:00’ OR i.publish_down >= ‘2016-02-05 06:52:01’ ) AND i.catid IN (88) AND (i.extra_fields REGEXP ‘{"id":"69","value":[^{]"18"’) ORDER BY c.ordering, i.ordering
I have analyze the above query and got the fields is passing here *‘{"id":"69","value":[^{]"18"’)** , but not getting the proper result please help.
Thanks
Sujit