I'm building Mysql query:
select * from `table` order by field(`column`, "param1", "param2", "param3")
where param1, param2, param3 comes from JSON Array ["param1", "param2", "param3"] and when I put the parameters hardcoded in the query everything is OK, but when I prepare it (because I don't know what count and order is coming):
set json_array='["param1", "param2", "param3"]';
select * from `table` order by field(`column`, replace(replace(json_array, '[', ''), ']', ''))
Its not working.