/[virtual-ldap]/sql/group.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /sql/group.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55 - (show annotations)
Wed Apr 29 12:22:40 2009 UTC (14 years, 11 months ago) by dpavlin
File size: 384 byte(s)
produce whole dn in SQL queries so we don't have to mungle it in code

1 select
2 concat('cn=',c.categorycode,',ou=',c.categorycode,',dc=ffzg,dc=hr') as dn,
3 'group' as objectClass,
4 c.categorycode as ou,
5 c.categorycode as cn,
6 description as description,
7
8 concat('uid=',replace(userid,'@ffzg.hr',''),',ou=',c.categorycode,',dc=ffzg,dc=hr') as members
9 from categories c
10 join borrowers b on b.categorycode = c.categorycode
11 where length(userid) > 0

  ViewVC Help
Powered by ViewVC 1.1.26