I want all rows from this table
The query of that db is
function getmodules(){
    $sql="SELECT * FROM module
    WHERE status=1";            
    $query=$this->db->query($sql);
    return $query;
}
and selected rows from this one as query written
the query for above db is
function getmoduledtls($id){
    $sql="SELECT * FROM module m
    INNER JOIN permissions p
    ON p.moduleId=m.moduleId
    WHERE m.status=1
    AND p.roleId='$id'";                        
    $query=$this->db->query($sql);
    return $query;
}


 
     
    