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)
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>";
}
}
@editor_catid = $DB->table('Editors','Category')->select(['CategoryID'],{Username => $user})->fetchall_list; ??
http://www.iuni.com/...tware/web/index.html
Links Plugins
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