I have a comma separated list stored in one row in a column in a mysql database (eg. phrase1, phrase2, phrase3, phrase4). I want to write a query that will deleted one of the values from that comma separated list, say 'phrase3', and its comma, making the list (phrase1, phrase2, phrase4). Ideas?
The list is generated with the following code if that helps:
$q6 = "UPDATE post SET denied_user = CONCAT_WS(', ',denied_user,'$claimer_id'), denied_time = CONCAT_WS(', ',denied_time,NOW()) WHERE post_id = '$post_id' AND user_id='$user_id' AND denied_user<>'' AND denied_user NOT LIKE '%$claimer_id%' AND post_status='active";