firstlord18
Erfahrenes Mitglied
Ach man , ich bekomms net hin. Hab jetzt echt serh viel versucht.
Hatte das:
dann wurde mir immer gesagt "unknown table", dann hab ich noch viele tables eingefügt:
So, und nun dauert mein Script etwa 7sekunden, und dann hab ich mega mega viele ergebnisse, also irgendwas stimmt da net :/
Hatte das:
PHP:
$sql = 'select
um_rights.id as rightsid,
um_rights.rightname,
um_rights.php_id,
um_users.id as userid,
um_users.username,
um_groups.id as groupid,
um_groups.groupname as groupname
from
um_rights as r
left join um_groups_rights
on um_groups_rights.groups_id=um_groups.id
left join um_rights
on um_groups_rights.rights_id=um_rights.id
left join um_rights as r1
on um_users_rights.rights_id=r1.id
left join um_users as u1
on um_users_rights.users_id=u1.id
where
um_groups.id > 1 AND
um_users.id > 1 AND
um_rights.id > 1
order by
um_groups.groupname ASC,
um_users.username ASC,
um_rights.rightname ASC';
dann wurde mir immer gesagt "unknown table", dann hab ich noch viele tables eingefügt:
PHP:
$sql = 'select
um_rights.id as rightsid,
um_rights.rightname,
um_rights.php_id,
um_users.id as userid,
um_users.username,
um_groups.id as groupid,
um_groups.groupname as groupname
from
um_rights as r,
um_users_rights as ur1,
um_users_rights as ur2,
um_users,
um_groups,
um_users_rights
left join um_groups_rights
on um_groups_rights.groups_id=um_groups.id
left join um_rights
on um_groups_rights.rights_id=um_rights.id
left join um_rights as r1
on um_users_rights.rights_id=r1.id
left join um_users as u1
on um_users_rights.users_id=u1.id
where
um_groups.id > 1 AND
um_users.id > 1 AND
um_rights.id > 1
order by
um_groups.groupname ASC,
um_users.username ASC,
um_rights.rightname ASC';
So, und nun dauert mein Script etwa 7sekunden, und dann hab ich mega mega viele ergebnisse, also irgendwas stimmt da net :/