I want to edit my existing mySQL query based on whether the column show_only_on has a value or not.
If it has a value, then the correct query is the below
Select *
FROM alerts_data
WHERE id = 'abc' AND running_status='idle'
AND FIND_IN_SET("https://www.example.com/pricing", show_only_on)
And if it does not have a value, I just leave out the
AND FIND_IN_SET("https://www.example.com/pricing", show_only_on)
or make the FIND_IN_SET return true.
How can I do this using only this query and not any PHP ?