Leser: 1
6 Einträge, 1 Seite |
1
2
3
4
5
6
SELECT username
FROM tabelle
WHERE
attribute != 'type'
OR
( attribute = 'type' AND value != 'reject' )
scriptor+2008-08-09 01:38:15--Code: (dl )1
2
3
4
5
6SELECT username
FROM tabelle
WHERE
attribute != 'type'
OR
( attribute = 'type' AND value != 'reject' )
1
2
3
4
5
6
7
8
9
+----------+
| username |
+----------+
| esskar |
| esskar |
| foo |
| foo |
| bar |
+----------+
1
2
3
4
5
6
7
8
9
my $check = $c->model('FreeRadius')->resultset('Radcheck')
->search(
{ },
{
select => [ 'username', "SUM(if(attribute='auth-type' and value='reject',1,0)) as rejected" ],
as => [ 'username', 'rejected' ],
group_by => \"username having rejected = 0"
}
);
6 Einträge, 1 Seite |