I have a system that search the Json_Array and it works perfectly fine. The only modification I’d like to apply is to return TRUE (1) when the input is also a empty string, so that it returns all values at the end. Here are 2 examples (single vs multiple selection) with the word “me”. How to code “” for both cases?
SELECT JSON_SEARCH(JSON_ARRAY('me', 'myself', 'I'), 'one', 'me') IS NOT NULL;
Can you explain where “%” comes into this? In first SELECT if you search for ‘’ instead of ‘me’ it returns 0 which can be switched to 1 if you change IS NOT NULL to IS NULL.
In the second select if you had JSON_ARRY(’’,‘x’) and add IS NOT NULL you will get a return 1.
Not sure where the “%” comes into your solution. Can you explain?