summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4d1c305)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@729
c11ca15a-4712-0410-83d8-
924469b57eb5
my ($type) = @_;
if ($type =~ /^author$/i) {
my ($type) = @_;
if ($type =~ /^author$/i) {
- my @array = &sqlSelectColArray("factoids",
+ my %hash = &sqlSelectColHash("factoids",
"factoid_key,created_by", { },
"created_by IS NOT NULL"
);
my %author;
"factoid_key,created_by", { },
"created_by IS NOT NULL"
);
my %author;
- foreach (@array) {
- my $thisnuh = $hash{$_};
+ foreach my $factoid (keys %hash) {
+ my $thisnuh = $hash{$factoid};
$thisnuh =~ /^(\S+)!\S+@\S+$/;
$author{lc $1}++;
$thisnuh =~ /^(\S+)!\S+@\S+$/;
$author{lc $1}++;
+ $query .= " WHERE " if (($where_href) || ($other));
if ($where_href) {
my $where = &hashref2where($where_href);
if ($where_href) {
my $where = &hashref2where($where_href);
- $query .= " WHERE $where" if ($where);
+ $query .= "$where" if ($where);
}
$query .= " $other" if $other;
}
$query .= " $other" if $other;