Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- table_name : the name of table that you want to update
- -- field_slug_name : the name of field/column on the `table_name` above to store slugify value (destination field)
- -- field_title_name : the name of field/column on the `table_name` above that would be slugify (source field)
- --
- UPDATE table_name
- SET
- field_slug_name=
- LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM(field_title_name), ':', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-'));
- --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement