Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How to update Community database from Links environment and vice versa

Quote Reply
How to update Community database from Links environment and vice versa
Greetings all,

I figured I'd ask before trying to reinvent the wheel....

I'm running community for authentication between Glinks and Gforum. What is the best way to modify the community user data table (comm_users), while working in the links environment. The only issue I'm seeing is that when working on the links programs, the tables are all automatically starting with "glinks" without that being specified. Is there a simple way to do this?

Cheers,

Alex
Quote Reply
Re: [AlexJ] How to update Community database from Links environment and vice versa In reply to
Hi,

If you just want a way to connect to the gcomm DB from GLinks, you can use GT::SQL to create a new DB object:

Code:
use GT::SQL;
my $NEWDB = new GT::SQL ( def_path => '/home/user/path/to/Communityfiles/defs', cache => 0, debug => 0, subclass => 1 );
my $user_rec = $NEWDB->table('comm_users')->select( { comm_id => $user_id } )->fetchrow_hashref;

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How to update Community database from Links environment and vice versa In reply to
Thanks Andy!

I was hoping someone might have this at their finger tips. I've not tried to go outside of the glinks db before, so this saved me some time figuring it out!

Smile

Cheers,

Alex