change value in text type field
| User, date | Message |
|---|---|
|
Written by javi_m
3 years ago Category: Running SQL scripts 2 posts since Fri, 29 Oct 10 |
Hi Everyone! I need some help with this. I¡m using Joomla!, wich as default parameter puts all the article images in a single folder. So, i need to reorder that images. That's not a problem itself. The problem is to give the joomla articles the new image path. For example: OLD path: mysite.com/images/stories/image.jpg NEW path: mysite.com/images/stories/NEWFOLDER/image.jpg The image path is stored in a text type field, so... how can i change the paths with a sql script? Like... change images/stories to images/stories/NEWFOLDER in all the records from x field, in x table... ? Cheers! (Sorry about my poor english) |
|
Written by ansgar
3 years ago 3949 posts since Fri, 07 Apr 06 |
UPDATE <yourtable> SET <colname> = REPLACE(<colname>, 'from_str', 'to_str') |
|
Written by javi_m
3 years ago 2 posts since Fri, 29 Oct 10 |
Thanks a lot anse! Cheers |
|
Please login to leave a reply, or register at first. |