Je kunt dit proberen -
UPDATE users SET eat = REPLACE(eat, 'banana', '') where eat like '%banana%';
Dit zou alleen banana
vervangen van eat
kolom waar het aanwezig is.
Bijwerken
Loop door de gegevens en vervang die waarden. Dit kan helpen -
$check_val = 'banana';
//select those rows first
"select id, eat from users where eat like '%" . $check_val . "%'"
foreach($data as $v) {
$temp= explode(',', $v['eat']);
$temp= array_map(function($t) use($check_val) {
return (strpos($t, $check_val) !== false) ? null : $t;
}, $temp);
$temp = array_filter($temp);
$v['eat']= implode(',', $temp);
"update users set eat= '" . $v['eat'] . "' where eat like '%" . $check_val . "%'"
}