PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
western_guest
New Member
New Member


Joined: Oct 08, 2007
Posts: 2

PostPosted: Mon Oct 08, 2007 12:01 pm Reply with quote Back to top

Hello, I'm new to PHP-Nuke but I must implement some modules.

The PHP-Nuke copy I'm extending uses CNB Your Account instead of the classic Your Account.

For some reason I need to add fields to the nuke_users table.

I've a custom table nuke_teams and I need to relate each user to his team, so I created in nuke_users a field nuke_team_id related to the team_id inside the nuke_teams table.

Someone has told me I should not add fields this way (even if there's a practical tutorial here:
Only registered users can see links on this board!
Get registered or login to the forums!
don't know if this applies to CNB Your Account too...)... but, instead, I should use CNB Your Account.

The fact is that I can't understand the inner workings of CNB: what does this do? If I add a field, is this field a sort of alias of a field inside the nuke_users table? Or what? How can I query it? Is there any reference guide?

Thanks!
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Mon Oct 08, 2007 1:06 pm Reply with quote Back to top

Problem is that if you modify the nuke users table that way you are likely to cause existing programs to malfunction. A lot of programs update the table using a list of values where each value corresponds implicitly to one field in the table. So if you add fields those programs are not going to know about it and they will generate errors.

Better to create a new table (like team_id) as you did and then have userid and team_id related within it. You can then take the userid's and go against the users table and find out the rest of the information you need about each user without modifying the core table.

The alternative is to go thru all the code in Nuke and modify every update statement for your new table definition. And even then you are out of luck when the next set of updates comes thru.

I don't know about CNB, they may have some facility to add fields and keep the SQL statements up to date.
View user's profile Send private message Visit poster's website
western_guest
New Member
New Member


Joined: Oct 08, 2007
Posts: 2

PostPosted: Tue Oct 09, 2007 1:03 am Reply with quote Back to top

fkelly wrote:

Better to create a new table (like team_id) as you did and then have userid and team_id related within it. You can then take the userid's and go against the users table and find out the rest of the information you need about each user without modifying the core table.


This is a good idea, thanks! Smile
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum