update column based on another column with custom php function
Hello!
I have table with huge record. I have two columns name_bg and name_en.
I added more two columns ….. ident_bg and ident_en.
But they must have data based on data in name_bg and name_en with some change data.
Here mysql statement who work:
Code (text):
UPDATE firms tu, firms ts
SET
tu.ident_bg =ts.name_bg,
tu.ident_en = ts.name_en
WHERE tu.id=ts.id
But i have function which must be applied to the columns ts.name_bg and ts.name_en.
i.e.
Code (text):
Slug::slugify(ts.name_bg)
…
update column based on another column with custom php function
See original post by bumbar
Leave a Reply
You must be logged in to post a comment.