// Get from the database permissions that were not in the static variable.
// Only role IDs with at least one permission assigned will return rows.
$result=db_query("SELECT r.rid, p.permission FROM {role} r INNER JOIN {role_permission} p ON p.rid = r.rid WHERE r.rid IN (:fetch)",array(':fetch'=>$fetch));
$result=db_query("SELECT rid, permission FROM {role_permission} WHERE rid IN (:fetch)",array(':fetch'=>$fetch));