php - MySQL - replace the searched value in the rows -


i want replace(remove) searched name on rows includes name. example, if remove john name rows,

it done using;

update users set friends = replace(friends, 'john', '') friends '%john%'; 

however; problem is, values stored below in rows;

,john|1428352438,,megan|1462548732,,fox|1426825014,,ramy|1428352438, 

the numbers representing date have been added. if want remove ,john|1428352438, method should use remove ? (the date numbers changes on every record)


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -