How to update data as null in mysql using php loop?


I have a table named users with a column called user_subs. It looks like this.


In user_subs I have stored the specific users session username. Lets say this specific users name is James.

Now how would I loop through a specific user_subs looking for "James" and remove him from that specific user_subs without removing all the other names.

This is what I have so far and the only problem is its deleting all the usernames in user_subs instead of just "James".

if(isset($_GET['p_id'])) {   $the_post_id = $_GET['p_id'];   $the_post_author = $_GET['author'];  }
if(isset($_POST['delete_sub'])) {   $username = $_SESSION['username'];
$query = "SELECT user_subs FROM users WHERE username = '{$username}' ";   $select_users_by_id = mysqli_query($connection $query);
while ($row = mysqli_fetch_array($select_users_by_id)) {   $user_subs = explode('