I have a database field with the IDs like "~1~2~3~4~5~6~7~8~9~10~11". I want to list all the records having 6 and 11 available in the field with a single query.
MySQL Query:
SELECT interests
FROM personal
WHERE interests != ''
AND interests REGEXP "^[0-9~]+6[0-9~]+11[0-9~]*$"