In my table I have a field "youtube" where the user can add a Youtube or Vimeo link. The Youtube links can be played directly, the Vimeo links which looks like:
https://vimeo.com/22614651XX
needs to be replaced by:
https://player.vimeo.com/video/22614651XX
Can this be done with SQL or should it be done in PHP? In PHP I found the substr() Function where I can split a string, but I have no clue how to deal with the numbers as they can vary in length...
replace()/str_replace()swappinghttps://vimeo.com/forhttps://player.vimeo.com/video/REPLACE(column, 'https://vimeo', 'https://player.vimeo')should do it. Use that with anupdateif you want it stored that way.