Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Editors Online: Table Join Prob

Quote Reply
Editors Online: Table Join Prob
Paul (or any of you SQL/perl experts!), I am in the midst of modifying your who's online script to show details of the editors categories, when the user online is an editor...

I am almost there, but I am not sure how to do a table join I get a list of category paths, and not category id's... (the script so far is actually working)

Code:


sub main {
#----------------------------------------------------------
# Show whos online with editor info.

my @sess = ();
my @online = ();
my $path = "/s/mysite.com/cgi-bin/admin/sessions";
my $sess = {};
my @editor_catid = ();
my $user =();

opendir (DIR, $path) or die "Can't read sessions : $path : $!";
@sess = grep { /^\w+$/ } readdir(DIR);
closedir DIR;

print "Content-type: text/html\n\n";

for (@sess) {
$sess = do("$path/$_");
$user = $sess->{username};
@editor_catid = $DB->table('Editors')->select(['CategoryID'],{Username => $user})->fetchall_list;
print "$user : @editor_catid<br>";
}

}








Code:


@editor_catid = $DB->table('Editors','Category')->select(['CategoryID'],{Username => $user})->fetchall_list; ??



http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

sooke: May 17, 2002, 11:46 AM
Subject Author Views Date
Thread Editors Online: Table Join Prob Ian 3503 May 17, 2002, 11:26 AM
Thread Re: [sooke] Editors Online: Table Join Prob
Ian 3289 May 17, 2002, 1:09 PM
Post Re: [Ian] Editors Online: Table Join Prob
pugdog 3257 May 27, 2002, 3:42 AM
Thread Re: [Ian] Editors Online: Table Join Prob
Paul 3233 May 27, 2002, 4:29 AM
Thread Re: [Paul] Editors Online: Table Join Prob
Ian 3238 May 27, 2002, 8:28 AM
Thread Re: [Ian] Editors Online: Table Join Prob
silky 3217 Jun 2, 2002, 7:46 PM
Post Re: [chaos] Editors Online: Table Join Prob
Ian 3227 Jun 2, 2002, 7:53 PM