|
|
| Author |
Message |
| Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| angryjonny |
This post is not being displayed .
|
 angryjonny World Chat Champion

Joined: 01 Sep 2006 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| elky |
This post is not being displayed .
|
 elky Renault 5 Driver

Joined: 05 Aug 2010 Karma :   
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| supZ |
This post is not being displayed .
|
 supZ World Chat Champion

Joined: 03 Feb 2009 Karma :   
|
 Posted: 14:21 - 01 Apr 2011 Post subject: |
 |
|
unfortunately i use mssql not mysql but you will be able to get that done by using a replace command and updating the record.
MS SQL:
| Code: |
UPDATE jos_hwdvidscategories
SET thumbnail= REPLACE(thumbnail,'/joomla/hwdvideos/thumbs/','/hwdvideos/thumbs/')
|
i cant imagine the mysql version being much different. have a google
you can of course just replace /joomia/ with / if you want too as the folder structure is the same bar that dir
edit:
just checked myself and it looks like its the same syntax ____________________ CBR954RR - Daily toy
CBR600RR - Trackbike |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| mjn51 |
This post is not being displayed .
|
 mjn51 Traffic Copper
Joined: 04 Feb 2011 Karma :  
|
 Posted: 14:31 - 01 Apr 2011 Post subject: |
 |
|
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| angryjonny |
This post is not being displayed .
|
 angryjonny World Chat Champion

Joined: 01 Sep 2006 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
 Posted: 14:44 - 01 Apr 2011 Post subject: |
 |
|
Good stuff... I'm such a retard, I thought, "I'll backup the database now and run some of these queries". Started clicking on things in the database and nothing was working, 5 minutes later, I was clicking the screenshot I uploaded in this topic  |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
 Posted: 14:52 - 01 Apr 2011 Post subject: |
 |
|
supZ, worked a treat! Saved me about 4 hours of manual labour there! Same to the others, thanks for the help, much appreciated.
 |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| supZ |
This post is not being displayed .
|
 supZ World Chat Champion

Joined: 03 Feb 2009 Karma :   
|
 Posted: 15:11 - 01 Apr 2011 Post subject: |
 |
|
np
yeh the other examples basically removed the beginning of the string, getting rid of the extra bit you didnt need (the /joomlia bit) whereas my example replaced the text within the string.
my example will work even if you want to replace/remove some text in the middle of the string. substring can work the same way but you need to define the start and end of the portion of the string you're changing rather than looking for an occurance of the part of the string you're looking for
and LMAO @ the screenshot  ____________________ CBR954RR - Daily toy
CBR600RR - Trackbike |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Kickstart |
This post is not being displayed .
|
 Kickstart The Oracle

Joined: 04 Feb 2002 Karma :     
|
 Posted: 15:16 - 01 Apr 2011 Post subject: |
 |
|
Hi
Would probably have been easiest to use substring_index:-
| Code: | UPDATE sometable
SET somecolumn = SUBSTRING_INDEX(somecolumn,'/joomla',-1)
WHERE somecolumn LIKE '/joomla%' |
Or just using SUBSTR:-
| Code: | UPDATE sometable
SET somecolumn = SUBSTR(somecolumn,8)
WHERE somecolumn LIKE '/joomla%' |
This works as SUBSTR will return the rest of the string if you just give a starting point.
All the best
Keith ____________________ Traxpics, track day and racing photographs - Bimota Forum - Bike performance / thrust graphs for choosing gearing |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Jayy |
This post is not being displayed .
|
 Jayy Mr. Ponzi
Joined: 08 Jun 2009 Karma :  
|
 Posted: 15:30 - 01 Apr 2011 Post subject: |
 |
|
I posted the same thing on the Joomla forums, it had 160 views in about half an hour and not one person replied.
BCF ftw  |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
Old Thread Alert!
The last post was made 15 years, 164 days ago. Instead of replying here, would creating a new thread be more useful? |
 |
|
|