vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   NEWB Quest: How to add a new Field to Table (https://vborg.vbsupport.ru/showthread.php?t=250983)

Mopar Rob 09-22-2010 05:43 PM

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.

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/showthrea...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 [DATE]1285183256[/DATE] at [TIME]1285183256[/TIME] ---------------

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!


All times are GMT. The time now is 03:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00895 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete