Here is a handy sql statement for removing a trailing '/' in the column url [callout_box]
UPDATE websites
SET url = LEFT(url, LENGTH(url) - 1)
WHERE RIGHT(url, 1) = '/'
[/callout_box]
Useful mysql to remove / in a db column

Here is a handy sql statement for removing a trailing '/' in the column url [callout_box]
UPDATE websites
SET url = LEFT(url, LENGTH(url) - 1)
WHERE RIGHT(url, 1) = '/'
[/callout_box]
2 thoughts on “Useful mysql to remove / in a db column”
I am really impressed with your writing skills and also with the
layout on your blog. Is this a paid theme or did you modify it yourself?
Either way keep up the excellent quality writing, it’s rare to see a nice blog like this one these days.
I created it myself, writing the code. I do sell a copy of to interesting parties.
Comments are closed.