Log in

View Full Version : Query to change multiple smilies file path.


JacquiiDesigns
10-26-2010, 12:29 AM
Okay - I'm in the process of rebuilding my forum and am moving the main forum into the "forum" folder instead of the root folder.

I have hundreds of smilies that now have an incorrect file path.

I need a query that I can run in vB or phpMyAdmin that will for instance take the url http://JPiCForum.info/images/smilies/curtsey.gif and make it http://JPiCForum.info/forum/images/smilies/curtsey.gif

Help please.

--------------- Added 1288138033 at 1288138033 ---------------

Solution found thanks to Trevor over at vBulletin.com (http://www.vbulletin.com/forum/showthread.php?365499-Query-to-change-multiple-smilies-file-path.)

Try this.

UPDATE prefixsmilie SET smiliepath = replace(smiliepath,'images/smilies','images/newpath');

Substituting in your old path in place of images/smilies and your new path in place of images/newpath. If you have a prefix on your tables, replace prefix with this or remove that.

** MAKE SURE YOU BACKUP YOUR DATABASE FIRST **