View Full Version : Change: ID of Prefix
Ghostt
04-14-2010, 11:53 AM
How can i the ID of the Prefix/category?
is it enough to change the "Table vbprefix " or is there a sql command i can use to change it in my whole forum?
Marco van Herwaarden
04-14-2010, 12:07 PM
There should be no reason to change this.
Ghostt
04-14-2010, 12:14 PM
There should be no reason to change this.
but i see the table in phpadmin why it shouldnt work? do i break my DB with a change ?
Marco van Herwaarden
04-14-2010, 12:18 PM
It is refenced in othewr places. As a rule of thumb you should never try to change any of the id fields, it also doesn't server any purpose to change them.
Ghostt
04-14-2010, 12:27 PM
the reason why i want to change is complex :
i have to change it because ive installed this mod Mark Threads As 'Solved (https://vborg.vbsupport.ru/showthread.php?t=211020&page=14)but i had allready befor a solved prefix and want to keep the ropics as solved and not to have another prefix or 2 "solved"prefixes
Marco van Herwaarden
04-14-2010, 12:33 PM
In that case you will need to update all tables where it is used. You can find all tables by searching the file ./install/mysql-schema.php for "prefixid".
After you have updated all tables, edit & save any prefix in the AdminCP to rebuild the datastore.
Ghostt
04-14-2010, 12:43 PM
sry but i dont have a install folder anymore, because of security reasons ive deleted it after vb install...
is there any alternative method?
Marco van Herwaarden
04-14-2010, 12:56 PM
You should still have the zip-file on your PC, otherwise you can download it again from the Members' Area.
PS For security reasons you only need to delete the install.php file, not the directory. Some files in the directory are even needed in case of some maintenance functions.
Ghostt
04-14-2010, 01:15 PM
ok ive found the mysql-schema.php file from 3. November 2009 and loaded it up to installl derectory. but what i have to do now ?
dont understand the sense to search for "prefixid" and then what?
what i have to change:
CATEGORY: Erledigt <change to> solvedthread
PREFIX: Erledigt1 <change to> solvedthread_solved
Marco van Herwaarden
04-14-2010, 02:13 PM
Open it with a text editor and search where this column is used.
Ghostt
04-14-2010, 02:32 PM
Open it with a text editor and search where this column is used.
i know how to search for it i have cuteftp pro...
just dont understand the sense of it and what to change. i told you i need to rename the names of the IDs
CATEGORY: "Erledigt" <rename to> "solvedthread"
PREFIX: "Erledigt1" <rename to> "solvedthread_solved"
cant find "Erledigt" or something else in the file ...
Marco van Herwaarden
04-14-2010, 02:38 PM
The mysql-schema file will show you in which tables have a column named prefixid. For all those tables you will need to update the values in that column, changing your old prefix-id to the new.
Ghostt
04-14-2010, 02:44 PM
The mysql-schema file will show you in which tables have a column named prefixid. For all those tables you will need to update the values in that column, changing your old prefix-id to the new.
ah that you mean. sry but im to sql noob for this i cant that...
ive searched vor "Erledigt" the "old"at phpmyadmin prefix and it showed many tables more then 140+ i think because so many theards have that prefix allready.
i need an other solution like replace comand for sql or so..
Marco van Herwaarden
04-14-2010, 03:19 PM
Once you have determined which tables to update you can use MySQL queries to change the values:
UPDATE <TableName> SET prefixid = "<NewPrefixID>" WHERE prefixid = "<OldPrefixId>";I strongly recommend to make a bakcup first and to try it on a test database first.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.