• OzzModz is no longer taking registrations. All registrations are being redirected to Snog's Site
    All addons and support is available there now.

Change style ID No

Is there a way to change the style id number? I have a style number 55 and want to change it to number 1. Is there a way?
 
I would have to believe you could do it in the DB, but you would have to also change the stylevar table as well. Best thing to do is try it out on a test site.
 
Does it is help if run the following sql

Code:
UPDATE style SET styleid='##NEWSTYLEID##', parentlist = '##NEWSTYLEID##,-1' WHERE styleid='##OLDSTYLEID##';
UPDATE stylevar SET styleid='##NEWSTYLEID##' WHERE styleid='##OLDSTYLEID##';
UPDATE template SET styleid='##NEWSTYLEID##' WHERE styleid='##OLDSTYLEID##';
UPDATE templatehistory SET styleid='##NEWSTYLEID##' WHERE styleid='##OLDSTYLEID##';
 
That looks ok, but again, I never tried it, so it would be best to fully test that on a test site before you do it. :)
 
What I didn't understand at my first, Does ##NEWSTYLEID## Replace with My style ID ? If style number 55 and want to change it to number 1 , How to doing this code ?

Code:
UPDATE style SET styleid='1', parentlist = '1,[COLOR="#FF0000"]-1[/COLOR]' WHERE styleid='55';

Does it Corrected code ?
 
So i need to all code run via SQL ? Or Only RUN UPDATE style SET ?

Code:
UPDATE style SET styleid='##NEWSTYLEID##', parentlist = '##NEWSTYLEID##,-1' WHERE styleid='##OLDSTYLEID##';
UPDATE stylevar SET styleid='##NEWSTYLEID##' WHERE styleid='##OLDSTYLEID##';
UPDATE template SET styleid='##NEWSTYLEID##' WHERE styleid='##OLDSTYLEID##';
UPDATE templatehistory SET styleid='##NEWSTYLEID##' WHERE styleid='##OLDSTYLEID##';

With This :

Code:
UPDATE style SET styleid='1' WHERE styleid='55';
UPDATE stylevar SET styleid='1' WHERE styleid='55';
UPDATE template SET styleid='1' WHERE styleid='55';
UPDATE templatehistory SET styleid='1' WHERE styleid='55';
 
Back
Top