View Full Version : NEWB Quest: How to add a new Field to Table
Mopar Rob
09-22-2010, 05:43 PM
Ok here is a real NEWB questions, I went through a whole MOD and edited all kinds of lines in .php files then to find out I need to add a new FIELD to an existing table. HOW DO I DO THAT?? I need to add a "rankorder" field to the RANKS table.
Any help will be greatful.
betts02
09-22-2010, 06:14 PM
Admin -
User Profile Fields -
Add New User Profile Field
Fill it in and save
Whwn done it shall have the filed you have just created
Look what FIELD it has given you for this
Then that is the field id you need for your mod
Some mods are different so first try -
"Field(the number)"
if this does not work then try just the number
Mopar Rob
09-22-2010, 06:19 PM
I thought the way the instructions were written it says I need to add a FIELD to the existing RANKS table. So by adding a custom user field wouldnt work I think. Here is the Mod I am doing. It starts with the second LINE on Post #20 The Quote from the coder is:>>>>> In theory, all we need to do is add a field to the "rank" table called "rankorder".<<<<<
https://vborg.vbsupport.ru/showthread.php?t=109292&highlight=RANKORDER&page=2
I did all of teh Text edits to the .PHP files they reference. So now its looking for that "RANKORDER FIELD"
--------------- Added 1285183256 at 1285183256 ---------------
Here is the ERROR I am getting. I am assuming that the error is because I do not have the RANKORDER field added to the Rank database.
Database error in vBulletin 4.0.5:
Invalid SQL:
SELECT rankid, ranklevel, minposts, rankimg, ranks. usergroupid,title, type, display, stack, rankorder
FROM ranks AS ranks
LEFT JOIN usergroup AS usergroup USING(usergroupid)
ORDER BY rankorder, ranks.usergroupid, minposts;
MySQL Error : Unknown column 'rankorder' in 'field list'
Error Number : 1054
ragtek
09-22-2010, 08:27 PM
you shouldn't edit the php files,use the pluginsystem instead!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.