src/snac/server/database/SQL.php
/**
     * Select one role record
     *
     * Get all fields of a single role. Also, get a list of related pids, returning it as a simple array.
     *
     * If we really always (and only?) call selectRolePrivilegeList() from here, and nowhere else, could we do
     * a join and gain some efficiency? Calling code would have to be modified.
     *
     * @param int $rid Role ID to look up
     * @return string[] Return associative array of role information. Also includes key 'pid_list' which is a
     * list of privilege ids for the given role.
     */
Select one role record
Get all fields of a single role. Also, get a list of related pids, returning it as a simple array.

If we really always (and only?) call selectRolePrivilegeList() from here, and nowhere else, could we do
a join and gain some efficiency. Calling code would have to be modified.

@param int $rid Role ID to look up
@return string[] Return associative array of role information. Also includes key 'pid_list' which is a
list of privilege ids for the given role.
Select one role record Get all fields of a single role . Also get a list of related pids returning it as a simple array . If we really always ( and only? ) call selectRolePrivilegeList () from here and nowhere else could we do a join and gain some efficiency . Calling code would have to be modified . @param int $rid Role ID to look up @return string [] Return associative array of role information . Also includes key ' pid_list ' which is a list of privilege ids for the given role .
public function selectRole($rid)
    {
        $result = $this->sdb->query("select * from role where id=$1",
                                    array($rid));
        $row = $this->sdb->fetchrow($result);
        $row['pid_list'] = $this->selectRolePrivilegeList($row['id']);
        return $row;
    }
public function selectRole ( $ rid ) { $ result = $ this -> sdb -> query ( " select * from role where id=$1 " , array ( $ rid ) ) ; $ row = $ this -> sdb -> fetchrow ( $ result ) ; $ row [ 'pid_list' ] = $ this -> selectRolePrivilegeList ( $ row [ 'id' ] ) ; return $ row ; }
Select one role record
 Get all fields of a single role.
Select one role record Get all fields of a single role .