Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 22 Sep 2010, 19:43
Mopar Rob Mopar Rob is offline
 
Join Date: Jul 2010
NEWB Quest: How to add a new Field to Table

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.
Reply With Quote
  #2  
Old 22 Sep 2010, 20:14
betts02's Avatar
betts02 betts02 is offline
 
Join Date: Jun 2009
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
Reply With Quote
  #3  
Old 22 Sep 2010, 20:19
Mopar Rob Mopar Rob is offline
 
Join Date: Jul 2010
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".<<<<<

http://www.vbulletin.org/forum/showt...NKORDER&page=2

I did all of teh Text edits to the .PHP files they reference. So now its looking for that "RANKORDER FIELD"

--------------- Added 22 Sep 2010 at 20:20 ---------------

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

Last edited by Mopar Rob; 22 Sep 2010 at 20:22. Reason: Auto-Merged DoublePost
Reply With Quote
  #4  
Old 22 Sep 2010, 22:27
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
you shouldn't edit the php files,use the pluginsystem instead!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 06:34.

Layout Options | Width: Wide Color: