php插入到db,其中另一列包含一些单词

I have a new question cause i didnt find it anywhere. I have a db which contains 4 columns. I did my bot to insert array to a column.Now i have to fill another columns.

My filled column contains site links. Exmp: www.dizipub.com/person-of-interest-1-sezon-2-bolum-izle I need to take "person-of-ınterest" part and write it to another column as kind of a "Person of Interest". And also "1-sezon-2-bolum" as "Sezon 1 - Bölüm 1".

I couldnt find it to do with php not sql. I need to make it with bot. Can someone help me about it please.

database

There is a column named bolumlink where i put the links. As i told i need to take some words from these links. For instance: dizi column needs to be filled with "Pretty Little Liars" in first 9 row.

It can be done by SQL Update with Like which allows you to select rows with pattern based search using wild-cards:

  • % matches any number of characters, even zero characters.

  • _ matches exactly one character.

update your_table set dizi = 'Pretty Little Liars' where bolumlink like '%pretty-little-liars%'

NOTE:

Updating your database using like without limit or conditions with unique columns can be dangerous. This code might affect the whole table if empty string is passed.